I am a newbie for about ten years now, off and on, so I've forgotten so much. I do my Build in Keil for the TI Launchpad Board and I get, on a horizontal pane, at the bottom , a list of warnings and error codes that I cannot make any sense of. First of all, Warnings aren't, that I know of , going to stop a Build. In my case however, I'm getting a tsunami of warnings that bury my one or two errors like a needle in a haystack. I have no idea why keil does that, mingling errors with warnings. Can I suppress the warnings for now, so I have a chance at trouble shooting the errors ? I did find a listing of error codes that attempts, in chart form, to demystify the error codes which, to me at least are so cryptic I haven't a clue what they mean. Here is an example of what I mean, with a warning. I cannot even find the errors. To me this is just meaningless ...
C:/Users/Binky/AppData/Local/Arm/Packs/ARM/CMSIS-DSP/1.14.4/Source/TransformFunctions/arm_cfft_radix2_init_q31.c(138): warning: cast from 'const unsigned short *' to 'unsigned short *' drops const qualifier [-Wcast-qual] S->pBitRevTable = (uint16_t *) & armBitRevTable[7];
Abraxas said: I don't see what ""C:/Users/Binky/AppData/Local/Arm/Packs/ARM/CMSIS-DSP/1.14.4/Source/TransformFunctions/arm_cfft_radix2_init_q31.c(138):S->pBitRevTable = (uint16_t *) & armBitRevTable[7]; "" has to do with the C language ?
C:/Users/Binky/AppData/Local/Arm/Packs/ARM/CMSIS-DSP/1.14.4/Source/TransformFunctions/arm_cfft_radix2_init_q31.c(138)
is just the full path name of the file, and the number in brackets is the line number.
S->pBitRevTable = (uint16_t *) & armBitRevTable[7];
Is the line of code to which the message refers.
Abraxas said:It would also be nice to have it presented in an organized way, segregated Errors from Warnings
Some IDEs do this; eg, Eclipse and MSVC.
But it's not a panacea: as previously noted, it's often the case that a warning can lead to a later error - so separating them often causes more confusion!
Abraxas said:Yes I understand your explanation but I can't go running to others every time I do a build
So which parts did you find unclear - wasn't all the rest of it just C terminology?
As mentioned, and alluded to in the MOOC The Science of Every Day Thinking, when we know something, it's all perfectly clear. As the saying goes "Hindsight is always 20/20", To yourself it's all perfectly clear and just the C language. "is just the full path name of the file, and the number in brackets is the line number." is NOT part of the C language and unless the end user is told this, I don't know how they would ever know or be expected to know. Ditto for much of the rest of the warnings. Why not " Warning: Type cast conflict in file arm_cfft_radix2_init_q31.c on line 138". Short and sweet and understandable. A user of the C language can be expected to know that once some data is declared as a certain type, not to undertake other operations on it that conflict with that data type. I'm not saying a file path isn't useful info, I could have just looked it up easily enough, but since I did not create the file, nor do I recall even including it as a linked entity, I did not know what it was or it's contents. "What's this about some table ?" were my thoughts...... and I still don't know what the table is, or why it's needed. I don't want an explanation now. I'm just saying how the uninitiated outsiders think. They can't put the word "File:" or "File path:" or "Line:" before the info ? We are expected to know this ? How ? It comes to us in a dream ? This has nothing to do with Kerns and Ritchie.
Abraxas said:Why not " Warning: Type cast conflict in file arm_cfft_radix2_init_q31.c on line 138".
Because that omits important information:
But agree that explicitly saying "File:", "Line:" (and some compilers include "Column:") would be better - it's not like the messages don't have the space for them!
Hmmm - this page claims to describe "the format of compiler diagnostic messages" for the ARM compiler:
https://developer.arm.com/documentation/dui0472/m/Compiler-Diagnostic-Messages
But it actually doesn't - there is no description of the format of the messages.
:(