[Kmymoney-devel] Recent compile warnings

mk-lists at email.de mk-lists at email.de
Sat Feb 22 12:50:15 UTC 2014


Hi devs,

building the latest sources I’ve spotted a couple of warnings.

The one in KDChart might be history in case a newer version is going to be introduced soon.

Greets,
Marko



----


/Users/okram/WC/GIT/kmymoney.anon/kmymoney/plugins/kbanking/mymoneybanking.cpp:104:37: warning: 
      comparison of constant -1 with expression of type 'bool' is always true
      [-Wtautological-constant-out-of-range-compare]
          if (exp.exactMatch(proxy) != -1) {
              ~~~~~~~~~~~~~~~~~~~~~ ^  ~~
/Users/okram/WC/GIT/kmymoney.anon/kmymoney/plugins/kbanking/mymoneybanking.cpp:337:25: warning: 
      comparison of constant -1 with expression of type 'bool' is always true
      [-Wtautological-constant-out-of-range-compare]
  if (exp.exactMatch(s) != -1) {
      ~~~~~~~~~~~~~~~~~ ^  ~~




[  3%] Building CXX object libkdchart/src/CMakeFiles/kmm_kdchart.dir/KDChartCartesianAxis.cpp.o
/Users/okram/WC/GIT/kmymoney.anon/libkdchart/src/KDChartCartesianAxis.cpp:314:57: warning: operator
      '?:' has lower precedence than '-'; '-' will be evaluated first [-Wparentheses]
                if( qAbs( mayBeTick - diagramIsVertical ? leftPoint.y() : leftPoint.x() ) > 1 ){
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/okram/WC/GIT/kmymoney.anon/libkdchart/src/KDChartCartesianAxis.cpp:314:57: note: place
      parentheses around the '-' expression to silence this warning
                if( qAbs( mayBeTick - diagramIsVertical ? leftPoint.y() : leftPoint.x() ) > 1 ){
                                                        ^
                          (                            )
/Users/okram/WC/GIT/kmymoney.anon/libkdchart/src/KDChartCartesianAxis.cpp:314:57: note: place
      parentheses around the '?:' expression to evaluate it first
                if( qAbs( mayBeTick - diagramIsVertical ? leftPoint.y() : leftPoint.x() ) > 1 ){
                                                        ^
                                      (                                                )





In file included from /Users/okram/WC/GIT/kmymoney.anon/kmymoney/widgets/kmymoneyedit.cpp:18:
/Users/okram/WC/GIT/kmymoney.anon/kmymoney/widgets/kmymoneyedit.h:108:23: warning: private field
      'calculatorButtonVisibility' is not used [-Wunused-private-field]
  bool                calculatorButtonVisibility;
                      ^





In file included from /Users/okram/WC/GIT/kmymoney.anon/kmymoney/converter/convertertest.cpp:35:
/Users/okram/WC/GIT/kmymoney.anon/kmymoney/reports/reportstestcommon.h:103:8: warning: private field
      'm_applytosub' is not used [-Wunused-private-field]
  bool m_applytosub;
       ^
1 warning generated.
[100%] Building CXX object kmymoney/converter/CMakeFiles/convertertest.dir/__/reports/reportstestcommon.cpp.o
In file included from /Users/okram/WC/GIT/kmymoney.anon/kmymoney/reports/reportstestcommon.cpp:18:
/Users/okram/WC/GIT/kmymoney.anon/kmymoney/reports/reportstestcommon.h:103:8: warning: private field
      'm_applytosub' is not used [-Wunused-private-field]
  bool m_applytosub;
       ^






More information about the KMyMoney-devel mailing list