Strange travis error with concatenated strings

Hi folks,

I’m try to prepare a pull request for a contribution to the Tasmota project: https://github.com/arendst/Tasmota

Here is a link to my build:
https://travis-ci.org/DillonJ/Tasmota

This is the error I am getting:

In file included from /home/travis/build/DillonJ/Tasmota/tasmota/tasmota.ino:38:0:
420tasmota/tasmota_template.h:327:3: error: expected ',' or ';' before 'D_SENSOR_CT_POWER'
421 D_SENSOR_CT_POWER;
422 ^

Here is the offending code… I can’t figure out the problem:

// Text in webpage Module Parameters and commands ADC
const char kAdc0Names[] PROGMEM =
  D_SENSOR_NONE "|" D_ANALOG_INPUT "|"
  D_TEMPERATURE "|" D_LIGHT "|"
  D_SENSOR_BUTTON "|" D_SENSOR_BUTTON "i|"
  D_SENSOR_CT_POWER;
//  D_SENSOR_SWITCH "|" D_SENSOR_SWITCH "i|"

I have just added: D_SENSOR_CT_POWER

I really can’t figure this error out… the code compiles and executes fine.

This looks like a problem with your code. Look at preprocessing result for the corresponding source file (look up how to do that in the documentation for the tools you are using), this should show the syntax that the compiler is complaining about and allow you to determine what is wrong with it.

Just to mention that it compiles cleanly for me with no warnings.

More often than not, this is caused by either environment differences between your system and Travis, or by additional entities silently used by your local build (uncommitted changes, external/temporary files, running services) that are, naturally, not present in Travis.

That’s why it’s critical to properly diagnose the problem: without that, you cannot say with confidence whose side the problem is on.

1 Like