All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 15/15] Makefile.inc: Enable -Wextra and -Wformat-nonliteral
@ 2016-10-10 19:17 Xose Vazquez Perez
  2016-10-10 19:55 ` Bart Van Assche
  0 siblings, 1 reply; 4+ messages in thread
From: Xose Vazquez Perez @ 2016-10-10 19:17 UTC (permalink / raw)
  To: Bart Van Assche, device-mapper development

Hi Bart,

With this patch, clang is emitting four new warnings:

> Instead of selecting some of the options enabled by -Wextra, enable
> -Wextra and disable some of the options enabled by -Wextra. Enable
> -Wformat-nonliteral.
>
> --- a/Makefile.inc
> +++ b/Makefile.inc
>  [...]
> -OPTFLAGS	= -Wunused -Wstrict-prototypes -O2 -g -pipe -Wformat-security -Wall \
> -		  -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
> +OPTFLAGS	= -O2 -g -pipe -Wall -Wextra -Wformat=2 \
> +		  -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered\
> +		  -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector \
> +		  --param=ssp-buffer-size=4


clang -O2 -g -pipe -Wall -Wextra -Wformat=2 -Wno-sign-compare -Wno-unused-parameter -fstack-protector --param=ssp-buffer-size=4 -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmpathcmd
-DUSE_SYSTEMD=229 -DLIBDM_API_FLUSH -D_GNU_SOURCE -DLIBDM_API_COOKIE -DLIBUDEV_API_RECVBUF -DLIBDM_API_DEFERRED -c -o devmapper.o devmapper.c
devmapper.c:86:20: warning: format string is not a string literal [-Wformat-nonliteral]
                vfprintf(stdout, f, ap);
                                 ^
1 warning generated.

clang -O2 -g -pipe -Wall -Wextra -Wformat=2 -Wno-sign-compare -Wno-unused-parameter -fstack-protector --param=ssp-buffer-size=4 -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmpathcmd
-DUSE_SYSTEMD=229 -DLIBDM_API_FLUSH -D_GNU_SOURCE -DLIBDM_API_COOKIE -DLIBUDEV_API_RECVBUF -DLIBDM_API_DEFERRED -c -o debug.o debug.c
debug.c:41:21: warning: format string is not a string literal [-Wformat-nonliteral]
                        vfprintf(stdout, fmt, ap);
                                         ^~~
1 warning generated.

clang -O2 -g -pipe -Wall -Wextra -Wformat=2 -Wno-sign-compare -Wno-unused-parameter -fstack-protector --param=ssp-buffer-size=4 -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmpathcmd
-DUSE_SYSTEMD=229 -DLIBDM_API_FLUSH -D_GNU_SOURCE -DLIBDM_API_COOKIE -DLIBUDEV_API_RECVBUF -DLIBDM_API_DEFERRED -c -o log_pthread.o log_pthread.c
log_pthread.c:28:17: warning: format string is not a string literal [-Wformat-nonliteral]
                vsyslog(prio, fmt, ap);
                              ^~~
1 warning generated.

clang -O2 -g -pipe -Wall -Wextra -Wformat=2 -Wno-sign-compare -Wno-unused-parameter -fstack-protector --param=ssp-buffer-size=4 -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmpathcmd
-DUSE_SYSTEMD=229 -DLIBDM_API_FLUSH -D_GNU_SOURCE -DLIBDM_API_COOKIE -DLIBUDEV_API_RECVBUF -DLIBDM_API_DEFERRED -c -o log.o log.c
log.c:121:32: warning: format string is not a string literal [-Wformat-nonliteral]
        vsnprintf(buff, MAX_MSG_SIZE, fmt, ap);
                                      ^~~
1 warning generated.

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 00/15] Fifteen multipath-tools patches
@ 2016-10-04 17:36 Bart Van Assche
  2016-10-04 17:42 ` [PATCH 15/15] Makefile.inc: Enable -Wextra and -Wformat-nonliteral Bart Van Assche
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2016-10-04 17:36 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development

Hello Christophe,

As promised I am sending you the multipath-tools patches from my local 
repository. The names of these patches are:

0001-libmultipath-prioritizers-ontap-Remove-an-unused-inc.patch
0002-libmultipath-memory-Move-an-include-directive.patch
0003-libmultipath-checkers-tur-Declare-local-functions-st.patch
0004-libmultipath-checkers-rbd-Declare-local-functions-st.patch
0005-multipathd-libmultipathd-Make-delays-independent-of-.patch
0006-multipathd-Suppress-uninteresting-data-race-reports.patch
0007-multipathd-Fix-a-data-race.patch
0008-libmultipath-checkers-tur-Introduce-strlcpy.patch
0009-libmultipath-checkers-tur-Terminate-a-statement-with.patch
0010-libmultipath-checkers-tur-Move-pthread_attr_destroy-.patch
0011-libmultipath-checkers-tur-Protect-tur_checker_contex.patch
0012-libmultipath-checkers-tur-Serialize-tur_checker_cont.patch
0013-libmultipath-checkers-tur-Fix-races-on-tur_checker_c.patch
0014-libmultipath-Micro-optimize-snprint_size.patch
0015-Makefile.inc-Enable-Wextra-and-Wformat-nonliteral.patch

Thanks,

Bart.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-10 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10 19:17 [PATCH 15/15] Makefile.inc: Enable -Wextra and -Wformat-nonliteral Xose Vazquez Perez
2016-10-10 19:55 ` Bart Van Assche
2016-10-10 21:51   ` Xose Vazquez Perez
  -- strict thread matches above, loose matches on Subject: below --
2016-10-04 17:36 [PATCH 00/15] Fifteen multipath-tools patches Bart Van Assche
2016-10-04 17:42 ` [PATCH 15/15] Makefile.inc: Enable -Wextra and -Wformat-nonliteral Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.