RE: [clang] r234928 amd64 buildworld error

From: Oleg Moskalenko <oleg.moskalenko_at_citrix.com>
Date: Mon, 14 May 2012 00:00:31 -0700
We already have a fix for this problem with clang, and we are going to submit it soon.

gcc behaves differently on the same sources, they can be compiled just fine with gcc.

Thanks
Oleg

> -----Original Message-----
> From: owner-freebsd-current_at_freebsd.org [mailto:owner-freebsd-
> current_at_freebsd.org] On Behalf Of Anton Shterenlikht
> Sent: Sunday, May 13, 2012 11:54 PM
> To: freebsd-current_at_freebsd.org
> Subject: [clang] r234928 amd64 buildworld error
> 
> clang -O2 -pipe  -DSORT_THREADS -std=gnu99 -Qunused-arguments -fstack-
> protector
> -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter
> -Wstrict
> -prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-
> qual -Wwri
> te-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-
> subscripts -
> Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-
> pointer-s
> ign -Wno-empty-body -Wno-string-plus-int -c
> /usr/src/usr.bin/sort/file.c
> /usr/src/usr.bin/sort/file.c:601:12: error: format string is not a
> string
>       literal (potentially insecure) [-Werror,-Wformat-security]
>                                 err(2, getstr(7));
>                                        ^~~~~~~~~
> /usr/src/usr.bin/sort/sort.h:52:20: note: expanded from macro 'getstr'
> #define getstr(n)        catgets(catalog, 1, n, nlsstr[n])
>                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/src/usr.bin/sort/file.c:942:11: error: format string is not a
> string
>       literal (potentially insecure) [-Werror,-Wformat-security]
>                         err(2, getstr(8));
>                                ^~~~~~~~~
> /usr/src/usr.bin/sort/sort.h:52:20: note: expanded from macro 'getstr'
> #define getstr(n)        catgets(catalog, 1, n, nlsstr[n])
>                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/src/usr.bin/sort/file.c:1279:10: error: format string is not a
> string
>       literal (potentially insecure) [-Werror,-Wformat-security]
>                 err(2, getstr(9));
>                        ^~~~~~~~~
> /usr/src/usr.bin/sort/sort.h:52:20: note: expanded from macro 'getstr'
> #define getstr(n)        catgets(catalog, 1, n, nlsstr[n])
>                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/src/usr.bin/sort/file.c:1295:12: error: format string is not a
> string
>       literal (potentially insecure) [-Werror,-Wformat-security]
>                         errx(2, getstr(10));
>                                 ^~~~~~~~~~
> /usr/src/usr.bin/sort/sort.h:52:20: note: expanded from macro 'getstr'
> #define getstr(n)        catgets(catalog, 1, n, nlsstr[n])
>                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 4 errors generated.
> *** [file.o] Error code 1
> 
> Stop in /usr/src/usr.bin/sort.
> *** [all] Error code 1
> 
> 
> --
> Anton Shterenlikht
> Room 2.6, Queen's Building
> Mech Eng Dept
> Bristol University
> University Walk, Bristol BS8 1TR, UK
> Tel: +44 (0)117 331 5944
> Fax: +44 (0)117 929 4423
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-
> unsubscribe_at_freebsd.org"
Received on Mon May 14 2012 - 05:00:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:26 UTC