NicoHood / HoodLoader2

16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE
http://www.nicohood.de
737 stars 186 forks source link

warning: deprecated conversion in installation sketch #35

Closed jango-fx closed 7 years ago

jango-fx commented 8 years ago

fyi: i'm getting a lot of warnings uploading the installation sketch to an UNO

/HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 };  // end of signatures
 ^
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:462:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino: In function 'void showHex(byte, boolean, boolean)':
 /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:511:38: warning: narrowing conversion of '((((int)(b >> 4)) & 255) | 48)' from 'int' to 'char' inside { } [-Wnarrowing]
   char buf [4] = { ((b >> 4) & 0x0F) | '0', (b & 0x0F) | '0', ' ' , 0 };
                                      ^
                                      /HoodLoader2-master/avr/examples/Installation_Sketch/Installation_Sketch.ino:511:56: warning: narrowing conversion of '((((int)b) & 15) | 48)' from 'int' to 'char' inside { } [-Wnarrowing]
   char buf [4] = { ((b >> 4) & 0x0F) | '0', (b & 0x0F) | '0', ' ' , 0 };
NicoHood commented 8 years ago

Thats a good point, I am going to fix this when I got time.

NicoHood commented 7 years ago

Fixed in dev branch: https://github.com/NicoHood/HoodLoader2/commit/1f2fb1062336dd13b6d1d6d90cf4cd4b3efb6970

I am not sure if the (char*) conversion fixes are correct, I could not test yet.