Hi Stuart, Stuart Henderson wrote on Sun, Feb 23, 2014 at 04:18:20PM +0000: > On 2014-02-23, Ingo Schwarze <schwa...@usta.de> wrote: >> d...@genunix.com wrote on Sun, Feb 23, 2014 at 08:54:34AM -0500:
>>> I am seeing strange and questionable messages while attempting a compile >>> and then test of GNU gettext 0.18.3.2 thus : >>> >>> ../gnulib-lib/.libs/libgettextlib.so: warning: stpcpy() >>> is dangerous GNU crap; don't use it >>> ../gnulib-lib/.libs/libgettextlib.so: warning: strcpy() >>> is almost always misused, please use strlcpy() >>> ../gnulib-lib/.libs/libgettextlib.so: warning: strcat() >>> is almost always misused, please use strlcat() >>> ../gnulib-lib/.libs/libgettextlib.so: warning: sprintf() >>> is often misused, please use snprintf() >>> >>> Are these messages coming from within the OpenBSD world ? >> Yes. They come from ld(1), the OpenBSD linker, and cannot be disabled. > They can, by removing -DAPIWARN from Makefile.inc. You mean, /usr/src/lib/libc/Makefile.inc? Of course, if you recompile parts of the base system, you can change anything; that's the whole point of free software, isn't it? :-) I meant, there is no run-time mechanism for ld(1) to disable such warnings. > I wish the stpcpy warning was worded a bit more like the others.. Hum, yes, implementing these functions wasn't kettenis@' favourite pastime, and it shows. >> Note that it is theoretically possible to use these functions >> correctly; > Just as it's possible to use strl* functions incorrectly. > Hi postgresql, you're supposed to check the return value ;-) Most definitely. Choosing good tools is insufficient, you also need to use them correctly. Yours, Ingo