Hi
When i use a component like uart or gsm, during the compilation the compiler return me the following warnings
2G.c3: warning: passing argument 1 of 'FCD_047b1_UART1__ReceiveString' discards 'volatile' qualifier from pointer target type [enabled by default]
FCV_ANSWER[0] = FCV_RECEINVE[5];
^
2G.c:967:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
//Local variable definitions
^
2G.c3: warning: passing argument 1 of 'FCD_0ee11_gLCD_ILI9341__Print' discards 'volatile' qualifier from pointer target type [enabled by default]
mainendloop: goto mainendloop;
^
2G.c6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MX_UINT8 FCL_POS_STR;
^
the problem is both using the GSM component and the uart component.
These warnings multiply when you enter more lines of code.
In programs with many lines of code the warnings also appear for simple delays or for comments .
Warnings when i use uart component
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Warnings when i use uart component
Hello,
We do the same thing for PIC16, PIC8 and AVR devices and these compilers do not generate the warnings.
I've had a quick look through the compiler manual to see if we can maybe hide the warnings or even generate the correct code for the compiler but so far I haven't spotted the option to allow me to do this.
Is a warning you can safely ignore. We tag variables as volatile to ensure that any changes to the variable value are written back to the variable location.discards 'volatile' qualifier
We do the same thing for PIC16, PIC8 and AVR devices and these compilers do not generate the warnings.
I've had a quick look through the compiler manual to see if we can maybe hide the warnings or even generate the correct code for the compiler but so far I haven't spotted the option to allow me to do this.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 143
- Joined: Mon Aug 20, 2018 11:04 am
- Has thanked: 42 times
- Been thanked: 41 times
- Contact:
Re: Warnings when i use uart component
Hi Benj
Thanks for the reply.
These warnings appear when I introduce a conversion from int to char.
For example, if I try to print the number on the display (macro check answer, second if), then there is a conversion from value to character, it generates the warning.
However, if I do not have to print in this case the warning is not generated
Note:
this software works if the file system.h (https://www.microchip.com/SWLibraryWeb/ ... %20Library)
Otherwise, just remove the check mark from use supplementary code and disable the first icon
Thanks for the reply.
These warnings appear when I introduce a conversion from int to char.
For example, if I try to print the number on the display (macro check answer, second if), then there is a conversion from value to character, it generates the warning.
However, if I do not have to print in this case the warning is not generated
Note:
this software works if the file system.h (https://www.microchip.com/SWLibraryWeb/ ... %20Library)
Otherwise, just remove the check mark from use supplementary code and disable the first icon
- Attachments
-
- 2G.fcfx
- (24.29 KiB) Downloaded 191 times
Re: Warnings when i use uart component
Are there plans to update the compiler to eliminate these error messages? This will help everyone tremendously.
Thank you,
Gary
Thank you,
Gary