Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with GCC 6: GCodeMachine misleading-indentation #214

Closed
srakitnican opened this issue Mar 10, 2017 · 1 comment
Closed

Build error with GCC 6: GCodeMachine misleading-indentation #214

srakitnican opened this issue Mar 10, 2017 · 1 comment

Comments

@srakitnican
Copy link
Contributor

src/camotics/machine/GCodeMachine.cpp: In member function 'virtual void CAMotics::GCodeMachine::setSpeed(double, CAMotics::MachineEnum::spin_mode_t, double)':
src/camotics/machine/GCodeMachine.cpp:118:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   if (oldMode != mode)
   ^~
src/camotics/machine/GCodeMachine.cpp:121:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     switch (mode) {
     ^~~~~~
cc1plus: all warnings being treated as errors
scons: *** [build/camotics/machine/GCodeMachine.o] Error 1
scons: building terminated because of errors.

This shows up only when building with scons debug=1 option.

@jcoffland
Copy link
Member

Good catch. There were missing braces here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants