[ https://issues.apache.org/jira/browse/PROTON-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17775265#comment-17775265 ]
ASF GitHub Bot commented on PROTON-2772: ---------------------------------------- jiridanek commented on PR #409: URL: https://github.com/apache/qpid-proton/pull/409#issuecomment-1762995906 This PR currently only reveals the issues, it does not try to fix them. There is few tens of warnings generated, for C6328 and C6340 warnings. https://github.com/jiridanek/qpid-proton/actions/runs/6518361158/job/17703711656#step:12:810 The output of MSVC becomes quite messy when /analyze is enabled. Any suggestions what should be done about it would be most welcome. I _could_ just disable them one by one... and leave them for consideration at some time in the future. > [c] Add parameter safety annotations for printf format strings > -------------------------------------------------------------- > > Key: PROTON-2772 > URL: https://issues.apache.org/jira/browse/PROTON-2772 > Project: Qpid Proton > Issue Type: Improvement > Components: proton-c > Affects Versions: proton-c-0.39.0 > Reporter: Jiri Daněk > Assignee: Jiri Daněk > Priority: Major > Fix For: proton-c-0.40.0 > > > There seem to be various mismatched printf format arguments. This is best > resolved by annotating the string format parameters so that regular > compilation warns on the mismatches as they happen. > Proton already has some of this, but it is incomplete. > {noformat} > ``` > /home/jdanek/repos/qpid/qpid-proton/c/src/core/logger.c: In function > ‘pni_logger_log_raw’: > /home/jdanek/repos/qpid/qpid-proton/c/src/core/logger.c:204:41: error: format > ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type > ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=] > 204 | pn_fixed_string_addf(&out, "%04x/%04x: ", i, size); > | ~~~^ ~~~~ > | | | > | | size_t {aka long > unsigned int} > | unsigned int > | %04lx > cc1: all warnings being treated as errors > ``` > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org