Ticket #10686 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

add -Wall to clang build flags and fix warnings

Reported by: Steven Hahn Owned by: Steven Hahn
Priority: major Milestone: Release 3.3
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Ross Whitfield

Description

I turned on -Wall when compiling with clang on os x and discovered a few warnings. Fix those that we are responsible for and hide the rest.

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/QtPropertyBrowser/src/qtvariantproperty.cpp:195:24: warning: private field 'q_ptr' is not used [-Wunused-private-field]

QtVariantProperty *q_ptr;

1 warning generated.

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/DownloadInstrument.h:67:10: warning: private field 'm_isProxySet' is not used [-Wunused-private-field]

bool m_isProxySet;

1 warning generated.

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h:89:14: warning: private field 'm_res' is not used [-Wunused-private-field]

double m_res;

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h:97:12: warning: private field 'm_isDouble' is not used [-Wunused-private-field]

bool m_isDouble;

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h:99:14: warning: private field 'm_tau' is not used [-Wunused-private-field]

double m_tau;

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PhaseQuadMuon.h:101:14: warning: private field 'm_w' is not used [-Wunused-private-field]

double m_w;

4 warnings generated.

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSXD.h:73:14: warning: private field 'm_nDims' is not used [-Wunused-private-field]

size_t m_nDims;

1 warning generated.

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/SANSPlotSpecial.h:58:14: warning: private field 'm_parent' is not used [-Wunused-private-field]

QWidget* m_parent;

1 warning generated.

/Users/svh/Documents/MantidProject/mantid/Code/Mantid/MantidPlot/src/TiledWindow.cpp:25:11: warning: unused variable 'normalWidth' [-Wunused-const-variable] const int normalWidth(0);

1 warning generated.

Change History

comment:1 Changed 6 years ago by Steven Hahn

Refs #10686. fix warnings in Mantid and tests

Changeset: da2bf2ab685902bf5cdce381b491a688a86d35b1

comment:2 Changed 6 years ago by Steven Hahn

  • Status changed from new to verify
  • Resolution set to fixed

This is being verified as pull request #83.

comment:3 Changed 6 years ago by Steven Hahn

Refs #10686. fixed misspelled header guard.

Changeset: b9ce0d0e09ff6cde3fd0f214dffb6caf099935ac

comment:4 Changed 6 years ago by Steven Hahn

Refs #10686. fixed unused-parameter warning on gcc.

Changeset: 19d60aa4320d6570a432015cf9ad5f414f726c1a

comment:5 Changed 6 years ago by Ross Whitfield

  • Status changed from verify to verifying
  • Tester set to Ross Whitfield

comment:6 Changed 6 years ago by Ross Whitfield

  • Status changed from verifying to closed

Merge pull request #83 from mantidproject/feature/10686_fix_Wall_warnings

fix -Wall warnings on OS X with AppleClang

Full changeset: 86746e4f3b121a697be86bb6f65c12fa015772fc

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11528

Note: See TracTickets for help on using tickets.