Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Re: Bitx40 Pavel's blend sketch updated (the Allard's folk one with S-Meter, TX-meter, AGC)
Jack Purdum
Hi Jonathan: The problem stems from the definition of the model[] array. The new parser tightens things up a bit, as illustrated in the following program: void setup() { ? ? const char *model[] = {" LSB", " USB", " CWL", " CWU"}; ? ? // Use this line, no warning ? ? // char *model[] = {" LSB", " USB", " CWL", " CWU"}; ? ? ? ?// Use this line, deprecated warning ? char test[4]; ? Serial.begin(9600); ?? ? strcpy(test, model[1]); ? Serial.println(test);? } void loop() { } The problem is caused by not using the const type qualifier when you define a variable that has an initializer list like the code does above. Try running the sample program toggling the two definitions for model[]. Given the way I've used the array (in strcpy()), it's ok to ignore the warning. Jack, W8TEE From: jrea79 via Groups.Io <jrea79@...> To: [email protected] Sent: Wednesday, August 2, 2017 8:30 AM Subject: Re: [BITX20] Bitx40 Pavel's blend sketch updated (the Allard's folk one with S-Meter, TX-meter, AGC) hi! when i try compile it has this message: C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:194:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
?char *model[] = {" LSB", " USB", " CWL", " CWU"};
?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:194:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:194:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:194:48: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:269:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
?char *BARCHAR = "="; ? ?// char to show on the bar
?
? ? ? ? ? ? ? ? ?^
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
?};
?
?^
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
?
C:\Users\James\AppData\Local\Temp\Temp1_bitx40-master (3).zip\bitx40-master\bitx40\bitx40.ino:692:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
what's going on? please help thanks! 73! jonathan / DV2NAH |
to navigate to use esc to dismiss