¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: complile errors


 

Jack,

Sorry, that was the second compiler warning, not the first.

The first warning is correct as well.? If the condition ('digitalRead(FILTERENCODERSWITCH) != LOW') is false when first evaluated, execution falls through to the MyDelay() call.? execution then uses the uninitialized position variable in the statement flagged by the compiler.??

Brian - N8BDB


On Sun, Jan 27, 2019 at 11:39 PM Brian Bowling via Groups.Io <bowlingb=[email protected]> wrote:
Jack,

The first compiler warning says that 'delta' is set but not used.? Looking at the function it appears that is true.? I don't see where 'delta' is used after it's set.

Brian - N8BDB?

On Sun, Jan 27, 2019 at 9:34 PM jjpurdum via Groups.Io <jjpurdum=[email protected]> wrote:
Once again, the warning in yellow below is caused by this statement block:

int SetFilterCenterFrequency(int scaleStart, int ScaleEnd, int whichOne)
{
? char temp[4];
? int coordinate, delta, increment, target;

? increment = 50;
? target??? = 700;

? switch (whichOne) {?????????????? // Drawing for which filter?
??? case CWFILTER1:
????? target = cwCenterFrequency;
????? delta = 200;
????? break;

??? case CWFILTER3:
????? target = ssbCenterFrequency;
????? delta = 1000;
????? break;
// More lines....


As you can see, the error message is bogus, delta is set, but within a switch/case statement block and the GNU compiler does not parse it correctly. The #pragma errors can also be ignored. Besides, they are in libraries and, even though I could correct them, it's not my library.

If you have a previous install of the Teensyduino, you need to uninstall it, download the latest version and install it. The reason is because a number of libraries we use are those provided by the Teensy, not Adafruit. Read all of the documents before you try to install any of the software. It will say you time in the long run.

Jack, W8TEE


On Sunday, January 27, 2019, 7:22:07 PM EST, James Zdunic <james_zdunic@...> wrote:


Since the message indicates the teensy loader was activated I believe the compiler is happy.? I am getting the same (or very similar) messages when I compile and am able to load it into the teensy board.? However I can¡¯t speak in regards to functionality since I have not yet finished the build.

Jim KM4TXR

> On Jan 27, 2019, at 7:11 PM, k7da <k7da@...> wrote:
>
> ctrl-c worked just didn't think it di before.
>
>
> file compiles now with the below warnings i guess they are.? do they need to be corrected or is it good the way it is?
>
> dave k7da
>
>
>
> Equalizer.cpp: In function 'void SetEqualizerBands()':
> Equalizer.cpp:220: warning: 'position' may be used uninitialized in this function
>? ? ? rxEqualizer[j] = position;
>
>? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
>
> C:\JackaLSourceCode\JackAl_Ver0.91a\JackAl_Ver0.91a.ino: In function 'int SetFilterCenterFrequency(int, int, int)':
>
> C:\JackaLSourceCode\JackAl_Ver0.91a\JackAl_Ver0.91a.ino:622:19: warning: variable 'delta' set but not used [-Wunused-but-set-variable]
>
>? ? int coordinate, delta, increment, target;
>
>? ? ? ? ? ? ? ? ? ? ^
>
> C:\Arduino1.8.8\hardware\teensy\avr\libraries\UTFT\UTFT.cpp:78:48: note: #pragma message: Compiling for Teensy 3.X...
>
>? ? #pragma message("Compiling for Teensy 3.X...")
>
>? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
>
> In file included from C:\Arduino1.8.8\hardware\teensy\avr\libraries\UTFT\UTFT.cpp:79:0:
>
> C:\Arduino1.8.8\hardware\teensy\avr\libraries\UTFT\hardware/arm/HW_Teensy3.h:104:66: note: #pragma message: Using Ports B&D - pins should be connected to:
>





--
¡°si vis pacem, para bellum¡±

--
Brian - N8BDB



--
¡°si vis pacem, para bellum¡±

--
Brian - N8BDB

Join [email protected] to automatically receive all group messages.