Closed Bug 446229 Opened 12 years ago Closed 12 years ago
SM: fixing GCC conversion warnings
+++ This bug was initially created as a clone of Bug #441686 +++ Currently when compiling SM sources under GCC 4.2 woth -Wconversion enabled (browser builds) the compiler generates warnings like: NULL used in arithmetic converting to non-pointer type ‘long int’ from NULL deprecated conversion from string constant to ‘char*’ It would be nice to fix this.
To make things clear instead of changing the code like in: - STOBJ_SET_PARENT(FUN_OBJECT(fun), NULL); + STOBJ_SET_PARENT(FUN_OBJECT(fun), 0); I added *OBJ_CLEAR_(PROTO|PARENT) functions with usage like in: - STOBJ_SET_PARENT(FUN_OBJECT(fun), NULL); + STOBJ_CLEAR_PARENT(FUN_OBJECT(fun)); An alternative is to name the functions *OBJ_NULL_(PROTO|PARENT), but that may not sound good.
Attachment #330430 - Flags: review?(brendan)
Comment on attachment 330430 [details] [diff] [review] v1 Great, thanks! /be
Attachment #330430 - Flags: review?(brendan) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.