After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586346 - build failure: snprintf with wrong type: libnautilus-private/nautilus-{,meta}file.c
build failure: snprintf with wrong type: libnautilus-private/nautilus-{,meta}...
Status: VERIFIED FIXED
Product: nautilus
Classification: Core
Component: general
0.x.x [obsolete]
Other FreeBSD
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-19 07:56 UTC by David Adam
Modified: 2009-06-23 01:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Adam 2009-06-19 07:56:43 UTC
git revision: 66b53e8

With -Werror set, the build of Nautilus fails on FreeBSD 7.2-RELEASE due to an incorrect argument type to snprintf() at line 3209 of libnautilus-private/nautilus-file.c

Making all in libnautilus-private
  CC    nautilus-file.o
cc1: warnings being treated as errors
nautilus-file.c: In function 'nautilus_file_set_time_metadata':
nautilus-file.c:3209: warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
nautilus-file.c:3209: warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
gmake[2]: *** [nautilus-file.lo] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2

uname: FreeBSD musdea.ucc.gu.uwa.edu.au 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Tue Jun  9 21:30:43 UTC 2009     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

gcc: Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]
Comment 1 A. Walton 2009-06-19 08:18:50 UTC
Used g_snprintf() instead of snprintf(). Fixed in HEAD. Thanks for reporting.
Comment 2 David Adam 2009-06-22 07:06:06 UTC
Whoops - a similar change required in nautilus-metafile.c, at line 887:

-       snprintf (time_str, 20, "%ld", time (NULL));
+       g_snprintf (time_str, 20, "%ld", (long int)time (NULL));

does the job.
Comment 3 A. Walton 2009-06-22 13:06:50 UTC
Done and done. Thanks again.