[quake3-bugzilla] [Bug 3984] code/client/libmumblelink.c:126: warning: passing arg 1 of `munmap' from incompatible pointer type

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Thu Sep 17 05:40:30 EDT 2009


http://bugzilla.icculus.org/show_bug.cgi?id=3984

--- Comment #11 from Vincent Cojot <vincent at cojot.name> 2009-09-17 05:40:27 EDT ---
Hi Ryan,

#define _POSIX_C_SOURCE 2
doesn't fix it but fhe following does
#define _POSIX_C_SOURCE 199309L

I tried to investiguate the problem further but I was unable to figure out how
other big projects did it to avoid the warning. I found some info in a man page
named 'standards' on Solaris (See
http://compute.cnr.berkeley.edu/cgi-bin/man-cgi?standards)

With this diff, it compiles fine:

diff -c -r1.1 libmumblelink.c
*** libmumblelink.c     2009/09/17 08:25:48     1.1
--- libmumblelink.c     2009/09/17 09:28:00
***************
*** 25,30 ****
--- 25,33 ----
  #define uint32_t UINT32
  #else
  #include <unistd.h>
+ #ifdef __sun
+ #define _POSIX_C_SOURCE 199309L
+ #endif
  #include <sys/mman.h>
  #include <sys/types.h>
  #include <sys/stat.h>

All that's left is a warning about the format absence of cast:
 # make
gcc -Wall -c -o libmumblelink.o libmumblelink.c
libmumblelink.c: In function `mumble_link':
libmumblelink.c:91: warning: int format, uid_t arg (arg 4)

-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list