Skip to contentSkip to conversation

restool: fix build failure with gcc-14

PATCH New [email protected] 1 participant 1 message Jun 27, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 restool: fix build failure with gcc-14

From: Wang Mingyu <[email protected]>

Fix incompatible pointer type error with gcc option -Werror=format-overflow=:

| restool.c: In function 'main':
| restool.c:923:76: error: '__builtin___sprintf_chk' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
|   923 |                         size_buff = sprintf(restool.specified_dev_file, "%s", optarg);
|       |                                                                            ^
---
 recipes-dpaa2/restool/restool_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-dpaa2/restool/restool_git.bb +1 -1
index 1d1aeffe..a4219c77 100644
@@ -11,7 +11,7 @@ S = "${WORKDIR}/git"
 
 inherit bash-completion
 
-EXTRA_OEMAKE = 'CC="${CC}" MANPAGE= EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized -Wno-date-time"'
+EXTRA_OEMAKE = 'CC="${CC}" MANPAGE= EXTRA_CFLAGS="-O2 -Wno-missing-field-initializers -Wno-missing-braces -Wno-maybe-uninitialized -Wno-error=format-overflow -Wno-date-time"'
 
 do_install () {
     oe_runmake install DESTDIR=${D}
Signature · 1 line
2.34.1