Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 fix type punning warning

open
nobody
None
5
2004-02-12
2004-02-12
DataSurfer
No

$ make
make -C lib/ lib
make[1]: Entering directory `/cygdrive/c/Documents
and Settings/gjones/Desktop/libnet-0.10.11/libnet/lib'
gcc -O2 -Wall -Werror -Wno-unused -Wstrict-
prototypes -g -I../include -Iinclude -
DTARGET_MINGW32 -c -o drivers/internet.o
drivers/internet.c
drivers/internet.c: In function `do_init_channel':
drivers/internet.c:116: warning: dereferencing type-
punned pointer will break strict-aliasing rules
make[1]: *** [drivers/internet.o] Error 1
make[1]: Leaving directory `/cygdrive/c/Documents and
Settings/gjones/Desktop/libnet-0.10.11/libnet/lib'
make: *** [lib] Error 2

$ gcc --version
gcc (GCC) 3.3.1 (cygming special)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying
conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

Discussion

  • Logged In: NO

    A quick fix is in internet.c:116 and ipxsock.c:340 change

    ioctlsocket(variable, constant, (u_long *)&variable)

    to

    ioctlsocket(variable, constant, (void *)&variable)

    this will match the prototype for linux/bsd functions but
    will now break compiling with winsock

     
  • mator
    mator
    2005-01-02

    Logged In: YES
    user_id=273411

    hi!
    i'm just used -O1 optimization level for gcc, so libnet
    compiled ok for me, set it in libnet-0.10.11/lib/makefile

     
  • Interesting blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple adjustements would really make my blog jump out. Please let me know where you got your design. Appreciate it
    north face outlet http://fapnkzcigv.snappages.com/blog.htm