Skip to content

Make error: [-Werror=format-overflow=] in Arch #33

@zjeffer

Description

@zjeffer

On step 6, I got the following error:

In file included from /usr/include/stdio.h:867,
                 from ../../../../Common/esif_ccb.h:90,
                 from ../../../../Common/esif_sdk.h:56,
                 from ../../ESIF_CM/Sources/esif.h:56,
                 from ../../ESIF_UF/Sources/esif_uf.h:22,
                 from ../../ESIF_UF/Sources/esif_uf_shell.c:25:
In function ‘fprintf’,
    inlined from ‘esif_shell_cmd_config’ at ../../ESIF_UF/Sources/esif_uf_shell.c:9454:7:
/usr/include/bits/stdio2.h:100:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  100 |   return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  101 |    __va_arg_pack ());
      |    ~~~~~~~~~~~~~~~~~
../../ESIF_UF/Sources/esif_uf_shell.c: In function ‘esif_shell_cmd_config’:
../../ESIF_UF/Sources/esif_uf_shell.c:9455:12: note: format string is defined here
 9455 |        "%s,%s,%u,%s\n",
      |            ^~
In file included from /usr/include/stdio.h:867,
                 from ../../../../Common/esif_ccb.h:90,
                 from ../../../../Common/esif_sdk.h:56,
                 from ../../ESIF_CM/Sources/esif.h:56,
                 from ../../ESIF_UF/Sources/esif_uf.h:22,
                 from ../../ESIF_UF/Sources/esif_uf_shell.c:25:
In function ‘fprintf’,
    inlined from ‘esif_shell_cmd_config’ at ../../ESIF_UF/Sources/esif_uf_shell.c:9454:7:
/usr/include/bits/stdio2.h:100:10: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  100 |   return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  101 |    __va_arg_pack ());
      |    ~~~~~~~~~~~~~~~~~
../../ESIF_UF/Sources/esif_uf_shell.c: In function ‘esif_shell_cmd_config’:
../../ESIF_UF/Sources/esif_uf_shell.c:9455:12: note: format string is defined here
 9455 |        "%s,%s,%u,%s\n",
      |            ^~
cc1: all warnings being treated as errors
make: *** [Makefile:190: ../../ESIF_UF/Sources/esif_uf_shell.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions