GNU bug report logs -
#58966
[Trunk] Xcode 14.1+ (and macOS 13.0+) deprecate sprintf()
Previous Next
Full log
View this message in rfc822 format
> Cc: 58966 <at> debbugs.gnu.org
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Date: Thu, 03 Nov 2022 06:56:25 +0100
>
> Jacob Faibussowitsch <jacob.fai <at> gmail.com> writes:
>
> > Fresh build this morning produces many such warnings. I have attached
> > config.log and make.log:
> >
> > buffer.c:1223:46: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
> > AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i));
> > ^
>
> Yeah, I've got 14.1 over night now, too, and I now see the same :-(.
>
> >From a hort look, just replacing sprintf variants with snprintf variants
> won't be enough. Things like make_formatted_string would require
> interface changes, for example.
>
> I short, that looks to me like a ton of boring and potentially bug-prone
> work.
>
> What do the maintainers think about this?
If no better ideas come up, find a way to disable this bogus warning.
configure.ac has a block of lines that disable various warnings under
certain conditions, starting around line 1100. There are specific
warnings disabled when the compiler is clang. Add something there to
shut up this warning.
We aren't going to make any serious changes in this, certainly not
before the emacs-29 release branch is cut.
Thanks.
This bug report was last modified 2 years and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.