[Buildroot] [PATCH 1/1] support/kconfig: fix compiler warnings
Peter Korsgaard
peter at korsgaard.com
Thu Oct 7 06:22:34 UTC 2021
>>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:
> On 22/09/2021 16:08, Edgar Bonet wrote:
>> Compiling on Ubuntu 20.04 generates this:
>>
>> ./util.c: In function ‘file_write_dep’
>> ./util.c:54:18: warning: ‘..config.tmp’ directive writing 12 bytes
>> into a region of size between 1 and 4097 [-Wformat-overflow=]
>> 54 | sprintf(buf, "%s..config.tmp", dir);
>> | ^~~~~~~~~~~~
>> ./util.c:54:2: note: ‘sprintf’ output between 13 and 4109 bytes into a destination of size 4097
>> 54 | sprintf(buf, "%s..config.tmp", dir);
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> and similar warnings on confdata.c, lines 778, 989, 995, 1000, 1007,
>> 1040, 1046 and 1054. Avoid the warnings by enlarging the destination
>> buffer of fprintf().
>>
>> Signed-off-by: Edgar Bonet <bonet at grenoble.cnrs.fr>
>> ---
>> support/kconfig/confdata.c | 4 ++--
>> support/kconfig/util.c | 2 +-
>> 2 files changed, 3 insertions(+), 3 deletions(-)
> Normally, when we make changes to the kconfig sources, we want to
> keep track of that with patches in support/kconfig/patches. This
> allows us to track upstream without loosing the modifications we make.
> However, in this case, upstream has already heavily modified those
> files, and fixed the issues. So we there's no need to keep it as
> patches.
> Therefore, applied to master, with an updated commit message that
> explains the above, thanks.
Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.
Maybe it is time to resync out kconfig copy?
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list