[Webkit-unassigned] [Bug 43963] Avoid increasing required alignment of target type warning

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 16 22:22:35 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43963





--- Comment #7 from deepak <deepak.m at allaboutif.com>  2010-08-16 22:22:35 PST ---
Hi Loki, and everybody

I am not that good at C++, So please excuse if you find my question is silly.

The following patch will fix Vector buffer alignment warnings , which is done by casting m_inlineBuffer.buffer to static_cast<void*> 

So my question can we use reinterpret_cast_ptr in place of reinterpret_cast, instead of casting it to static_cast<void*> ? If yes then which one is safe solution

https://bug-38045-attachments.webkit.org/attachment.cgi?id=58134


I have ported 1.2.0 Gtk webkit release on both Arm and Mips ,But i get warnings only with Mips. And in Mips I also get alignment warnings at following lines. And as Balazs Kelemen said I am not sure if in all places if i use reinterpret_cast_ptr instead of reinterpret_cast , will resolve this warnings..


WebCore/platform/graphics/cairo/ImageBufferCairo.cpp lines 128 , 181 , 249: warning: cast from 'unsigned char*' to 'unsigned int*' increases required alignment of target type

WebCore/platform/graphics/cairo/ImageCairo.cpp:242: warning: cast from 'unsigned char*' to 'unsigned int*' increases required alignment of target type

WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:347: warning: cast from 'jpeg_error_mgr*' to 'WebCore::decoder_error_mgr*' increases required a    lignment of target type

WebKit/gtk/webkit/webkitwebview.cpp:2972: warning: cast from 'GTypeInstance*' to 'GtkAdjustment*' increases required alignment of target type
WebKit/gtk/webkit/webkitwebview.cpp:2973: warning: cast from 'GTypeInstance*' to 'GtkAdjustment*' increases required alignment of target type

JavaScriptCore/pcre/pcre_compile.cpp:2592: warning: cast from 'char*' to 'JSRegExp*' increases required alignment of target type

Best Regards

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list