Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
A
AntTweakBar
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Philip Trettner
  • AntTweakBar
  • Issues
  • #1

Closed
Open
Created May 25, 2016 by Christian Mattes@cmattes

TwColors.cpp contains misleading indentation

Due to the TweakBar being compiled with -Wall, this breaks builds of e.g. the glow-samples as below:

PS: A similar issue occurs at TwColors.cpp:109ff.

FAILED: AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o 
/usr/bin/g++   -DAntTweakBar_EXPORTS -D_UNIX -I/home/cmattes/Coding/glow-samples/AntTweakBar/include -g -fPIC   -Wall -Werror -std=c++11 -Wno-strict-aliasing -MMD -MT AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o -MF AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o.d -o AntTweakBar/CMakeFiles/AntTweakBar.dir/src/TwColors.cpp.o -c /home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp: In function 'void ColorRGBToHLSf(float, float, float, float*, float*, float*)':
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:22:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     if(_R>0) r = _R; if(r>1) r = 1;
     ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:22:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(_R>0) r = _R; if(r>1) r = 1;
                      ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:23:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     if(_G>0) g = _G; if(g>1) g = 1;
     ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:23:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(_G>0) g = _G; if(g>1) g = 1;
                      ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:24:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     if(_B>0) b = _B; if(b>1) b = 1;
     ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:24:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(_B>0) b = _B; if(b>1) b = 1;
                      ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp: In function 'void ColorHLSToRGBf(float, float, float, float*, float*, float*)':
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:109:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     if(_Hue>0)        rh = _Hue;        if(rh>360) rh = 360;
     ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:109:41: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(_Hue>0)        rh = _Hue;        if(rh>360) rh = 360;
                                         ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:110:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     if(_Light>0)      rl = _Light;      if(rl>1)   rl = 1;
     ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:110:41: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(_Light>0)      rl = _Light;      if(rl>1)   rl = 1;
                                         ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:111:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     if(_Saturation>0) rs = _Saturation; if(rs>1)   rs = 1;
     ^~
/home/cmattes/Coding/glow-samples/AntTweakBar/src/TwColors.cpp:111:41: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     if(_Saturation>0) rs = _Saturation; if(rs>1)   rs = 1;
                                         ^~
cc1plus: all warnings being treated as errors

used g++ (GCC) 6.1.1 20160501

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None