Note that the portability warning is issued only when I declare the pointer to a function returning an int,
which is possibly misunderstood just as an int (given that message). The other assignments show no
warning of any type, not even for style.
I'm running both cppcheck version 2.8 and 2.9, on Win11 pro, with the same result.
Last edit: Luc Matt 2023-01-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found a possible confusing message on portability, which after some tests I nailed down in this
example, with questionable source code:
File: try.c
Running
cppcheck --enable=all .
the result is as followsNote that the portability warning is issued only when I declare the pointer to a function returning an int,
which is possibly misunderstood just as an int (given that message). The other assignments show no
warning of any type, not even for style.
I'm running both cppcheck version 2.8 and 2.9, on Win11 pro, with the same result.
Last edit: Luc Matt 2023-01-26
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11522