Aaron Cripps
|
pathmgr/devmem.c -- case out of range
|
Aaron Cripps
08/12/2008 1:31 PM
post11696
|
pathmgr/devmem.c -- case out of range
I was linting devmem.c and I came across an interesting problem, lint complains of the following:
file: services/system/pathmgr/devmem.c, line:286, Warning, 650, "Constant '-2147221246' out of range for operator 'case'
"
So, I looked up the C89 standard (identical to the ANSI standard, except for section numbering), and it said, under
constraints:
"The expression of each case label shall be an integral constant expression."
This makes sense ,,, so, assuming DCMD_ALL_SETFLAGS (which is __DIOT(_DMCD_ALL, 2, int)) is a long int, it should fall
within the correct range (-2147483647, 2147483647).
This being the case, why is the complaint being made that it is out of range for the "case" operator?
Any ideas, as to the cause of the issue, or a suggested plan of action, would be appreciated.
Thanks,
-Aaron
|
|
|