Re: [PATCH 3/3] Silence a bunch of format-zero-length warnings
Heiko Voigt writes: > On Wed, May 07, 2014 at 11:19:09AM -0700, Junio C Hamano wrote: >> Jeff King writes: >> ... >> > Yeah, this started last summer when we added __attribute__((format)) to >> > the status_printf_ln calls, and I posted essentially the same patch. We >> > kind of waffled between "eh, just set -Wno-format-zero-length" and doing >> > something, and ended up at the former. I'd be fine with doing it this >> > way; we're not likely to add a lot of new callsites that would make it a >> > hassle to keep up with. >> >> OK, so I'll take it as your Ack ;-) > > What happened to this patch? These warnings are still annoying me on my > Ubuntu 14.04. As Peff summarized, an earlier patch was dropped with "It is easy for builders with such compilers to squelch the warning." We are reversing the course, with an updated log message like this ;-) The user have long been told to pass -Wno-format-zero-length, but a patch that avoids warning altogether is not too noisy, so let's do so. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Re: [PATCH 3/3] Silence a bunch of format-zero-length warnings
On Wed, May 07, 2014 at 11:19:09AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Sun, May 04, 2014 at 07:01:22PM +, brian m. carlson wrote: > > > >> On Sun, May 04, 2014 at 01:12:55AM -0500, Felipe Contreras wrote: > >> > This is in gcc 4.9.0: > >> > > >> > wt-status.c: In function ‘wt_status_print_unmerged_header’: > >> > wt-status.c:191:2: warning: zero-length gnu_printf format string > >> > [-Wformat-zero-length] > >> > status_printf_ln(s, c, ""); > >> > ^ > >> > > >> > We could pass -Wno-format-zero-length, but it seems compiler-specific > >> > flags are frowned upon, so let's just avoid the warning altogether. > >> > >> I believe these warnings existed before GCC 4.9 as well, but I'm not > >> opposed to the change. > > > > Yeah, this started last summer when we added __attribute__((format)) to > > the status_printf_ln calls, and I posted essentially the same patch. We > > kind of waffled between "eh, just set -Wno-format-zero-length" and doing > > something, and ended up at the former. I'd be fine with doing it this > > way; we're not likely to add a lot of new callsites that would make it a > > hassle to keep up with. > > OK, so I'll take it as your Ack ;-) What happened to this patch? These warnings are still annoying me on my Ubuntu 14.04. Cheers Heiko -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] Silence a bunch of format-zero-length warnings
Jeff King writes: > On Sun, May 04, 2014 at 07:01:22PM +, brian m. carlson wrote: > >> On Sun, May 04, 2014 at 01:12:55AM -0500, Felipe Contreras wrote: >> > This is in gcc 4.9.0: >> > >> > wt-status.c: In function ‘wt_status_print_unmerged_header’: >> > wt-status.c:191:2: warning: zero-length gnu_printf format string >> > [-Wformat-zero-length] >> > status_printf_ln(s, c, ""); >> > ^ >> > >> > We could pass -Wno-format-zero-length, but it seems compiler-specific >> > flags are frowned upon, so let's just avoid the warning altogether. >> >> I believe these warnings existed before GCC 4.9 as well, but I'm not >> opposed to the change. > > Yeah, this started last summer when we added __attribute__((format)) to > the status_printf_ln calls, and I posted essentially the same patch. We > kind of waffled between "eh, just set -Wno-format-zero-length" and doing > something, and ended up at the former. I'd be fine with doing it this > way; we're not likely to add a lot of new callsites that would make it a > hassle to keep up with. OK, so I'll take it as your Ack ;-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] Silence a bunch of format-zero-length warnings
On Sun, May 04, 2014 at 07:01:22PM +, brian m. carlson wrote: > On Sun, May 04, 2014 at 01:12:55AM -0500, Felipe Contreras wrote: > > This is in gcc 4.9.0: > > > > wt-status.c: In function ‘wt_status_print_unmerged_header’: > > wt-status.c:191:2: warning: zero-length gnu_printf format string > > [-Wformat-zero-length] > > status_printf_ln(s, c, ""); > > ^ > > > > We could pass -Wno-format-zero-length, but it seems compiler-specific > > flags are frowned upon, so let's just avoid the warning altogether. > > I believe these warnings existed before GCC 4.9 as well, but I'm not > opposed to the change. Yeah, this started last summer when we added __attribute__((format)) to the status_printf_ln calls, and I posted essentially the same patch. We kind of waffled between "eh, just set -Wno-format-zero-length" and doing something, and ended up at the former. I'd be fine with doing it this way; we're not likely to add a lot of new callsites that would make it a hassle to keep up with. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] Silence a bunch of format-zero-length warnings
brian m. carlson wrote: > On Sun, May 04, 2014 at 01:12:55AM -0500, Felipe Contreras wrote: > > This is in gcc 4.9.0: > > > > wt-status.c: In function ‘wt_status_print_unmerged_header’: > > wt-status.c:191:2: warning: zero-length gnu_printf format string > > [-Wformat-zero-length] > > status_printf_ln(s, c, ""); > > ^ > > > > We could pass -Wno-format-zero-length, but it seems compiler-specific > > flags are frowned upon, so let's just avoid the warning altogether. > > I believe these warnings existed before GCC 4.9 as well, but I'm not > opposed to the change. Yes, I'm aware of that. I didn't say they started to happen in 4.9, I said they happen in 4.9. -- Felipe Contreras-- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] Silence a bunch of format-zero-length warnings
On Sun, May 04, 2014 at 01:12:55AM -0500, Felipe Contreras wrote: > This is in gcc 4.9.0: > > wt-status.c: In function ‘wt_status_print_unmerged_header’: > wt-status.c:191:2: warning: zero-length gnu_printf format string > [-Wformat-zero-length] > status_printf_ln(s, c, ""); > ^ > > We could pass -Wno-format-zero-length, but it seems compiler-specific > flags are frowned upon, so let's just avoid the warning altogether. I believe these warnings existed before GCC 4.9 as well, but I'm not opposed to the change. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187 signature.asc Description: Digital signature