Skip to content

CMFSUPPORT-3977 : COVERITY TEST. DO NOT MERGE#15

Closed
snampo768 wants to merge 1 commit intodevelopfrom
feature/test-workflow
Closed

CMFSUPPORT-3977 : COVERITY TEST. DO NOT MERGE#15
snampo768 wants to merge 1 commit intodevelopfrom
feature/test-workflow

Conversation

@snampo768
Copy link
Copy Markdown

DO NOT MERGE

@snampo768 snampo768 requested a review from a team as a code owner March 9, 2026 05:59
Copilot AI review requested due to automatic review settings March 9, 2026 05:59
@snampo768 snampo768 requested a review from a team as a code owner March 9, 2026 05:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR appears to be a Coverity-oriented test change for MsgBusTestServer, adding a diagnostic fprintf and altering build flags to avoid format warnings being treated as errors.

Changes:

  • Added a fprintf(stderr, ...) line in ssp_main.c (currently with a format-string issue).
  • Added -Wno-error=format to MsgBusTestServer build flags in Makefile.am.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
source/MsgBusTestServer/ssp_main.c Adds a stderr log statement in main() (currently introduces a format mismatch).
source/MsgBusTestServer/Makefile.am Adjusts compiler flags to stop treating format warnings as errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.
Comment on lines +21 to 22
AM_CFLAGS += -Wno-error=format

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.
DmErr_t err;
debugLogFile = stderr;

fprintf(stderr, "Test coverity %s \n");
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

DmErr_t err;
debugLogFile = stderr;

fprintf(stderr, "Test coverity %s \n");
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

@snampo768
Copy link
Copy Markdown
Author

Close test pr

@snampo768 snampo768 closed this Mar 9, 2026
@snampo768 snampo768 deleted the feature/test-workflow branch March 9, 2026 07:11
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants