GNOME Bugzilla – Bug 745858
check: tempnam deprecated warning
Last modified: 2015-03-11 19:56:30 UTC
Created attachment 298834 [details] [review] change tempnam to mkstemp Using tempnam() gives warning and fails the build with -Werror. check_msg.c:235:22: warning: 'tempnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
There are also multiple warnings regarding unneeded -pthread argument to some libraries with clang: clang: warning: argument unused during compilation: '-pthread' How about adding -Wno-error=unused-command-line-argument?
(In reply to Michał Dębski from comment #1) > There are also multiple warnings regarding unneeded -pthread argument to > some libraries with clang: > clang: warning: argument unused during compilation: '-pthread' > > How about adding -Wno-error=unused-command-line-argument? That one should be fixed by not passing -pthread if not needed. It seems to be something wrong with the pthread configure check.
commit a7797d30a857fe739f57103375608e3b999d980f Author: Michał Dębski <debski.mi.zd@gmail.com> Date: Sun Mar 8 20:42:38 2015 +0100 check: Use mkstemp instead of tempnam if possible Using tempnam() is deprecated, this gives warning and fails the build with -Werror. https://bugzilla.gnome.org/show_bug.cgi?id=745858
Can you also provide this patch to check upstream? http://check.sourceforge.net/
Added: https://sourceforge.net/p/check/patches/51/ Regarding -pthread argument warning this looks like clang specific case, take a look at this link: http://stackoverflow.com/questions/17841140/os-x-clang-pthread Removing flags from libraries supposedly linking with pthread removes this warning and does not break build on clang, but I'm not sure what would happen on gcc. It seems like there are some check in ax_pthread.m4, but it is leaving -pthread flags for linking: common/m4/ax_pthread.m4:167 # Clang doesn't consider unrecognized options an error unless we specify # -Werror. We throw in some extra Clang-specific options to ensure that # this doesn't happen for GCC, which also accepts -Werror. Then there are some checks, but I'm not familiar with autotools to fully understand what is happening.