5 Commits

Author SHA1 Message Date
Wenlong Zhang
522fc42b27 Workaround -Wstringop-truncation error for loongarch64
(cherry picked from commit c57710b32d453f6e2314550e4942029465650e5c)
2025-02-11 09:51:06 +08:00
laokz
42b59db319 riscv64: Workaround -Wstringop-truncation error
On riscv64, the compiler complained:

     In file included from /usr/include/string.h:548,
                      from omxregister.c:42:
     In function 'strncpy',
         inlined from 'showComponentsList' at omxregister.c:110:3,
         inlined from 'main' at omxregister.c:463:9:
     /usr/include/bits/string_fortified.h:95:10: error: '__builtin_strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation]
        95 |   return __builtin___strncpy_chk (__dest, __src, __len,
           |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        96 |                                   __glibc_objsize (__dest));
           |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
     cc1: all warnings being treated as errors

It seems that the -O optimization to generate arch assemblies
leads to different behavior between riscv and arm, x86.
Add -Wno-stringop-truncation CFLAGS to workaround the problem.
2023-10-06 11:51:44 +08:00
starlet-dx
a0bd8fef12 Fix build failure caused by gcc upgrade to 12.3.1 2023-07-15 09:49:37 +08:00
Lu Weitao
f9c873909b fix compile failure by GCC-10
Signed-off-by: Lu Weitao <luweitaobe@163.com>
2021-08-10 15:29:23 +08:00
ruebb
fd41afd3ba package init 2019-12-31 18:15:33 +08:00