Re: [hatari-devel] sprintf deprecated in macOS 13.0 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] sprintf deprecated in macOS 13.0
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 4 Dec 2022 09:20:28 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1670145650; bh=WUcK2B6Su8ECic03TKf5sfZuD5f+NTba+YQBsrJ//EQ=; h=Date:From:To:Subject:From; b=Y8vQPFfjtOQ72JgySbmRa2PMxeqICft/qjy0rEcGLULYKqHHE9Xz/EiHKv8Sb2cjV 8mcUVNpo7FnOM/g3xOjkvg7bjuoJbCbWPtD00JcF9FR6n4p9UwEwxXgIcw87mjjtLY C3NR/1Qp8b3MqcdWHGZ2LsSO+FdPUGyj1FzU0JR2y+ElAXvMrANNz0pwBSZCocZcYi zhjDF5230S5tqBwouYqBbWBTEKU27bx2IjuqOE/EeEux0aiS7baYKFcySQQvlyhBJ7 ZLhLGN3Z4JKgm5eN84af10mR2ikXDkw0yn5K1y8wUEEbWQX5MhATtoGJOXuGP/vJYJ TESytxRV7PBog==
Am Sun, 6 Nov 2022 11:09:45 +0100
schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
> > Am 06.11.2022 um 01:13 schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> >
> > Hi,
> >
> > On 5.11.2022 18.37, Andreas Grabher wrote:
> >>> Am 05.11.2022 um 11:38 schrieb Thomas Huth <th.huth@xxxxxxxxx>:
> >>> schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
> >>>> it seems sprintf is deprecated in macOS 13.0. I am getting lots of warnings. They recommend to replace it with snprintf. I think we should do that.
> >>>
> >>> Uh, that will be another big code churn ... but I agree, it's likely a good
> >>> idea. Do you maybe want to do the convertion in the DSP code in
> >>> Previous? ... then I could port the patch to Hatari.
> >>>
> >> I appended a patch for the DSP code. It replaces all sprintf() with snprintf(). There are quite a lot left in other parts of the code, but not all are shared between Previous and Hatari.
> >
> > Thanks!
> >
> > Otherwise the patch seems fine, but why you're doing these buffer size increases:
> > -------------------------------------------
> > -static char str_instr[80];
> > -static char str_instr2[120];
> > +static char str_instr[96];
> > +static char str_instr2[192];
> > -------------------------------------------
> > ?
> >
> > These are static buffers, so their sizes are known at compile time i.e. GCC should have already been giving warnings if they would have been too small...
> >
> This has been left from some experiment. Sorry! Can be undone. On the other hand it won’t really harm either.
Ok, I've restored the original sizes in Hatari now.
Thanks,
Thomas