On Mon, Jul 29, 2024 at 09:58:57AM -0500, Eric Blake wrote: > On Mon, Jul 29, 2024 at 04:35:57PM GMT, Bruno Haible wrote: > > Hi Eric, > > > > I see two — mostly unrelated — topics in your mail and the referenced > > threads. > > > > 1) The coding paradigm. > > > > > The only reasonable change that should be done is to mark the > > declaration of asprintf and vasprintf with attribute > > __warn_unused_result__. This way, the compiler will warn about > > the crappy code. > > Makes sense; I would be in favor of that change in gnulib (and maybe > can convince Florian to consider that in glibc)
In glibc the attribute is there since 2006, see https://sourceware.org/cgit/glibc/commit/?id=11bf311edc7 Old git commits in glibc repository is a mess, but they are still somewhat usable. -- ldv