Re: [PATCH] Add format attribute for buffer_printf functions

2019-04-11 Thread Kevin J. McCarthy
On Wed, Apr 10, 2019 at 07:44:45PM -0400, aaron+m...@schrab.com wrote: Let compilers know that `mutt_buffer_printf()` and `mutt_buffer_add_printf()` expect the second argument to be a `printf`-style format string with the arguments for the format starting at the third argument. This allows warnin

Re: [PATCH] Generate version string during make not configure

2019-04-11 Thread Kevin J. McCarthy
On Wed, Apr 10, 2019 at 07:44:46PM -0400, aaron+m...@schrab.com wrote: I've been using this in my personal build for a long time, according to the author date on the commit it's been at least since 2012. I've submitted it once before as part of a series to support getting the version information

Re: [PATCH] Add format attribute for buffer_printf functions

2019-04-11 Thread Derek Martin
On Thu, Apr 11, 2019 at 07:17:01AM -0700, Kevin J. McCarthy wrote: > On Wed, Apr 10, 2019 at 07:44:45PM -0400, aaron+m...@schrab.com wrote: > >Let compilers know that `mutt_buffer_printf()` and > >`mutt_buffer_add_printf()` expect the second argument to be a > >`printf`-style format string with the

Re: [PATCH] Generate version string during make not configure

2019-04-11 Thread Kevin J. McCarthy
On Thu, Apr 11, 2019 at 07:20:37AM -0700, Kevin J. McCarthy wrote: On Wed, Apr 10, 2019 at 07:44:46PM -0400, aaron+m...@schrab.com wrote: I've been using this in my personal build for a long time, according to the author date on the commit it's been at least since 2012. I've submitted it once be

Re: Add format attribute for buffer_printf functions

2019-04-11 Thread Aaron Schrab
At 07:17 -0700 11 Apr 2019, "Kevin J. McCarthy" wrote: On Wed, Apr 10, 2019 at 07:44:45PM -0400, aaron+m...@schrab.com wrote: Let compilers know that `mutt_buffer_printf()` and `mutt_buffer_add_printf()` expect the second argument to be a `printf`-style format string with the arguments for the

Re: Add format attribute for buffer_printf functions

2019-04-11 Thread Kevin J. McCarthy
On Thu, Apr 11, 2019 at 10:08:56PM -0400, Aaron Schrab wrote: There are already a few uses of __attribute__ in the mutt code; mostly in `intl/` but also one in `monitor.c`. Well, the intl isn't really "mutt code", and the __attribute__ is only for a _LIBC defined function free_mem() in there.

Re: Add format attribute for buffer_printf functions

2019-04-11 Thread Fabian Groffen
On 11-04-2019 19:43:46 -0700, Kevin J. McCarthy wrote: [snip] > > The git codebase also tries to > >be extremely portable, but it makes a fair amount of use of > >__attribute__ including this one. For other compilers it does: > > > >#ifndef __GNUC__ > >#ifndef __attribute__ > >#define __attribute