Opened 14 months ago

#14642 new bug

interface/GraphicsDefs.h - rgb_color cast warning

Reported by: kallisti5 Owned by: nobody
Priority: low Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This is a *common* warning (repeated 1000's of times) in the arm build.

/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h: In function 'bool operator==(const pattern&, const pattern&)':
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:22:26: warning: cast from 'const uint8* {aka const unsigned char*}' to 'uint64* {aka long long unsigned int*}' increases required alignment of target type [-Wcast-align]
  uint64* pa = (uint64*)a.data;
                          ^~~~
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:23:26: warning: cast from 'const uint8* {aka const unsigned char*}' to 'uint64* {aka long long unsigned int*}' increases required alignment of target type [-Wcast-align]
  uint64* pb = (uint64*)b.data;
                          ^~~~
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h: In member function 'bool rgb_color::operator==(const rgb_color&) const':
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:65:27: warning: cast from 'const rgb_color*' to 'const uint32* {aka const long unsigned int*}' increases required alignment of target type [-Wcast-align]
   return *(const uint32 *)this == *(const uint32 *)&other;
                           ^~~~
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:65:53: warning: cast from 'const rgb_color*' to 'const uint32* {aka const long unsigned int*}' increases required alignment of target type [-Wcast-align]
   return *(const uint32 *)this == *(const uint32 *)&other;
                                                     ^~~~~
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h: In member function 'bool rgb_color::operator!=(const rgb_color&) const':
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:71:27: warning: cast from 'const rgb_color*' to 'const uint32* {aka const long unsigned int*}' increases required alignment of target type [-Wcast-align]
   return *(const uint32 *)this != *(const uint32 *)&other;
                           ^~~~
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:71:53: warning: cast from 'const rgb_color*' to 'const uint32* {aka const long unsigned int*}' increases required alignment of target type [-Wcast-align]
   return *(const uint32 *)this != *(const uint32 *)&other;
                                                     ^~~~~
C++ /home/kallisti5/Code/haiku/generated.arm/objects/haiku/arm/release/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.o 
In file included from /home/kallisti5/Code/haiku/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.h:10:0,
                 from /home/kallisti5/Code/haiku/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp:7:
/home/kallisti5/Code/haiku/headers/os/support/String.h: In member function 'int32 BString::Length() const':
/home/kallisti5/Code/haiku/headers/os/support/String.h:446:36: warning: cast from 'char*' to 'int32* {aka long int*}' increases required alignment of target type [-Wcast-align]
  return fPrivateData ? (*(((int32*)fPrivateData) - 1) & 0x7fffffff) : 0;
                                    ^~~~~~~~~~~~
In file included from /home/kallisti5/Code/haiku/headers/os/interface/InterfaceDefs.h:9:0,
                 from /home/kallisti5/Code/haiku/headers/os/support/UTF8.h:10,
                 from /home/kallisti5/Code/haiku/headers/os/mail/E-mail.h:9,
                 from /home/kallisti5/Code/haiku/headers/os/add-ons/mail_daemon/MailProtocol.h:20,
                 from /home/kallisti5/Code/haiku/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPProtocol.h:11,
                 from /home/kallisti5/Code/haiku/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp:16:
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h: In function 'bool operator==(const pattern&, const pattern&)':
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:22:26: warning: cast from 'const uint8* {aka const unsigned char*}' to 'uint64* {aka long long unsigned int*}' increases required alignment of target type [-Wcast-align]
  uint64* pa = (uint64*)a.data;
                          ^~~~
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:23:26: warning: cast from 'const uint8* {aka const unsigned char*}' to 'uint64* {aka long long unsigned int*}' increases required alignment of target type [-Wcast-align]
  uint64* pb = (uint64*)b.data;
                          ^~~~
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h: In member function 'bool rgb_color::operator==(const rgb_color&) const':
/home/kallisti5/Code/haiku/headers/os/interface/GraphicsDefs.h:65:27: warning: cast from 'const rgb_color*' to 'const uint32* {aka const long unsigned int*}' increases required alignment of target type [-Wcast-a

Change History (0)

Note: See TracTickets for help on using tickets.