You must have seen this problem many times, it is very annoying.
In fact, everyone can understand by searching casually. The reason for this problem is that uVision's default compilation will expect us to add a blank line at the end of the file. If we add it, it will be correct. If we don't, it will report an error.
But today I came across a way to permanently eliminate this warning: using uVision’s warning mask. uVision can partially ignore some warnings.
First of all, the prompt information of our warning is #1-D, which means that its number is 1.
We click the magic wand-C/C++ and make the following settings:
Enter --diag_suppress=1
to block warning No. 1. –diag_suppress= blocks specific warning content, including other warnings that you want to block. You can also use this method.
In this way, we will never have the annoying problem of adding an extra line in our current project.