Re: gcc 3.4 Compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thx for the quick answer. :)

Christian

Falk Hueffner schrieb:
Christian Ehrlicher <ehrlicher@xxxxxxxx> writes:


I got following warning where I don't expect.
"null argument where non-null required (arg 2)"

memmove(tmp1,0,MY_RET_DEF_SIZ(0));

It works because MY_RET_DEF_SIZ return 0 and so I think the warning
isn't usefull there.


The warning is correct; the standard requires a valid pointer even if
the length is zero. This is not very likely to cause problems with
actual implementations, though.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux