3 Replies Latest reply on Jul 31, 2016 5:59 AM by userc_39899

    sprintf compiler warning only with arguments and only in some projects

      This is very strange as it's such a common basic thing, I don't know what could cause this.


      This compiles:


      sprintf(outputstring, "data = 5");


      This does not:


      sprintf(outputstring, "data = %i", 5);


      Creator reports an error "Build error: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'."


      outputstring is global. Without the %i parameter it not only compiles but it also works just fine. Other types, such as %s, trigger the same error. If I include the %i without supplying an integer I get the correct error that a parameter is missing.


      In a fresh project sprintf with parameters works fine just as one would expect.


      The only project where I have this problem so far is the 100 Projects in 100 Days, Day009_DynamicBroadcaster.


      (I've been trying to debug DynamicBroadcaster because while it broadcasts the data in the advertisement never changes. That's a different issue though)


      Any ideas?