Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/MsgBusTestServer/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
##########################################################################
AM_CFLAGS =
AM_CFLAGS += -I$(top_srcdir)/source/MsgBusTestServer
AM_CFLAGS += -Wno-error=format

Comment on lines +21 to 22
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding -Wno-error=format disables treating format-string issues as errors for this target and can mask real bugs (including the new fprintf format mismatch). It would be safer to fix the offending format string(s) and keep format warnings as errors; if this is only needed for a specific analysis build, consider gating it behind a dedicated configure option/env var rather than always in AM_CFLAGS.

Suggested change
AM_CFLAGS += -Wno-error=format

Copilot uses AI. Check for mistakes.
ACLOCAL_AMFLAGS = -I m4

Expand Down
2 changes: 2 additions & 0 deletions source/MsgBusTestServer/ssp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ int main(int argc, char* argv[])
DmErr_t err;
debugLogFile = stderr;

fprintf(stderr, "Test coverity %s \n");
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fprintf uses a "%s" format specifier but does not provide a corresponding argument. That is undefined behavior and will be flagged by compilers with -Wformat; either remove the "%s" or pass the intended string argument (and consider dropping the extra space before the newline).

Suggested change
fprintf(stderr, "Test coverity %s \n");
fprintf(stderr, "Test coverity\n");

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Missing argument to printf format specifier

No argument for format specifier "%s".

Medium Impact, CWE-685
PRINTF_ARGS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Printf arg count mismatch

the format string requires additional arguments

Medium Impact, CWE-685
PW.TOO_FEW_PRINTF_ARGS


// Buffer characters till newline for stdout and stderr
setlinebuf(stdout);
setlinebuf(stderr);
Expand Down