I have not worked with the arduino compiler before and I have difficulties with the compiler output. In my sketch some warnings about "conversion from string literal to 'char *' is deprecated" pops up and I would like to understand which part of the sketch is triggering these warning to see how I can avoid theses warnings.
Code: Select all
SimpleDimmer_Multisensor_ah1.ino:55:16:warning:conversion from string literal to 'char *' is deprecated
SimpleDimmer_Multisensor_ah1.ino:59:16:warning:conversion from string literal to 'char *' is deprecated
SimpleDimmer_Multisensor_ah1.ino:62:16:warning:conversion from string literal to 'char *' is deprecated
SimpleDimmer_Multisensor_ah1.ino:67:18:warning:conversion from string literal to 'char *' is deprecated
SimpleDimmer_Multisensor_ah1.ino:69:18:warning:conversion from string literal to 'char *' is deprecated
SimpleDimmer_Multisensor_ah1.ino:71:16:warning:conversion from string literal to 'char *' is deprecated
SimpleDimmer_Multisensor_ah1.ino:74:16:warning:conversion from string literal to 'char *' is deprecated
If I look at the first numbers, line 55 is the closing paranthesis "}" of the loop() function, line 59 is a numeric calculation, line 62 is empty, line 67 is a "}" again, ...
If I create an error on purpose in e.g. line 116, an error in line 97 is reported, if I move the error to line 117 then line 98 is reported -> Offset 20 lines?
If I try to move the compiler error to the lines with the warnings I end up with an offset of 19 lines for these warnings, but if I create an error later in the file the offset is increased to 20.
So it "seems" that these warnings come from the serial.print function, but the "offset" also seems to vary / change during the code...
I know that these are only warnings, but if they were errors, how to point to the line of code that is triggering it? Is this a known problem with the arduino compiler? I tried to search a bit but did not find reports on wrong line numbers reported.
What is causing this "offset" and why is it changing?
Best regards,
Andreas.