Fixing warnings under GCC4 in preparation to enable -Werror there as well:

* Replaced the use of offsetof() for structs that aren't PODs. Add a
  offset_of_member() macro to util/khash.h because that's what it's used for
  in our cases.
* Change the signature of add_debugger_command()/remove_debugger_command() on
  GCC > 2 to avoid the depricated conversion from string constants to char *.
* Adding some "suggested" parenthesis. I know that not everyone likes that, but
  it pointed out at least one bug that is fixed here as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2009-02-01 20:48:02 +00:00
parent 47bc666311
commit c33667d400
24 changed files with 112 additions and 79 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ void
UserMessagingMessageSender::SendMessage(const KMessage* message, port_id port,
int32 token)
{
if (message != fMessage && fMessage != NULL
if ((message != fMessage && fMessage != NULL)
|| fTargetCount == MAX_MESSAGING_TARGET_COUNT) {
FlushMessage();
}