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

Compiler warnings on macOS #10572

Closed
1 task
FonsRademakers opened this issue May 12, 2022 · 0 comments · Fixed by #10574
Closed
1 task

Compiler warnings on macOS #10572

FonsRademakers opened this issue May 12, 2022 · 0 comments · Fixed by #10574
Assignees

Comments

@FonsRademakers
Copy link
Member

FonsRademakers commented May 12, 2022

  • Checked for duplicates

Describe the bug

Number of compiler warnings on unused variables on macOS:

/Users/rdm/rootsrc/core/unix/src/TUnixSystem.cxx:4967:17: warning: variable 'vsize' set but not used [-Wunused-but-set-variable]
      vm_size_t vsize, vprvt, rsize, size;
                ^
1 warning generated.
[6852/9530] Linking CXX static library lib/libclingUtils.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libclingUtils.a(PlatformWin.cpp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libclingUtils.a(PlatformWin.cpp.o) has no symbols
[8118/9530] Building CXX object proof/proof/CMakeFiles/Proof.dir/src/TProof.cxx.o
/Users/rdm/rootsrc/proof/proof/src/TProof.cxx:1047:11: warning: variable 'cpuPin' set but not used [-Wunused-but-set-variable]
   Bool_t cpuPin = kFALSE;
          ^
1 warning generated.
[8195/9530] Building CXX object graf2d/asimage/CMakeFiles/ASImage.dir/src/TASImage.cxx.o
/Users/rdm/rootsrc/graf2d/asimage/src/TASImage.cxx:2200:13: warning: variable 'disp' set but not used [-Wunused-but-set-variable]
   Display *disp;
            ^
1 warning generated.
[8199/9530] Building CXX object graf2d/gpad/CMakeFiles/Gpad.dir/src/TPad.cxx.o
/Users/rdm/rootsrc/graf2d/gpad/src/TPad.cxx:1535:34: warning: variable 'pxold' set but not used [-Wunused-but-set-variable]
   Int_t pxmin,pxmax,pymin,pymax,pxold,pyold,px,py;
                                 ^
/Users/rdm/rootsrc/graf2d/gpad/src/TPad.cxx:1535:40: warning: variable 'pyold' set but not used [-Wunused-but-set-variable]
   Int_t pxmin,pxmax,pymin,pymax,pxold,pyold,px,py;
                                       ^
2 warnings generated.
[8316/9530] Building CXX object gui/gui/CMakeFiles/Gui.dir/src/TGView.cxx.o
/Users/rdm/rootsrc/gui/gui/src/TGView.cxx:467:36: warning: variable 'cpyheight' set but not used [-Wunused-but-set-variable]
   Int_t xsrc, ysrc, xdest, ydest, cpyheight, cpywidth;
                                   ^
/Users/rdm/rootsrc/gui/gui/src/TGView.cxx:467:47: warning: variable 'cpywidth' set but not used [-Wunused-but-set-variable]
   Int_t xsrc, ysrc, xdest, ydest, cpyheight, cpywidth;
                                              ^
2 warnings generated.
[8479/9530] Building CXX object graf2d/cocoa/CMakeFiles/GCocoa.dir/src/MenuLoader.mm.o
/Users/rdm/rootsrc/graf2d/cocoa/src/MenuLoader.mm:92:16: warning: variable 'menuItem' set but not used [-Wunused-but-set-variable]
   NSMenuItem *menuItem = [aMenu addItemWithTitle : NSLocalizedString(@"Minimize", nil)
               ^
1 warning generated.
[8627/9530] Building CXX object gui/fitpanel/CMakeFiles/FitPanel.dir/src/TFitEditor.cxx.o
/Users/rdm/rootsrc/gui/fitpanel/src/TFitEditor.cxx:2806:26: warning: variable 'py1old' set but not used [-Wunused-but-set-variable]
   static Int_t  px1old, py1old, px2old, py2old; // to remember the square drawn.
                         ^
/Users/rdm/rootsrc/gui/fitpanel/src/TFitEditor.cxx:2806:34: warning: variable 'px2old' set but not used [-Wunused-but-set-variable]
   static Int_t  px1old, py1old, px2old, py2old; // to remember the square drawn.
                                 ^
/Users/rdm/rootsrc/gui/fitpanel/src/TFitEditor.cxx:2806:42: warning: variable 'py2old' set but not used [-Wunused-but-set-variable]
   static Int_t  px1old, py1old, px2old, py2old; // to remember the square drawn.
                                         ^
/Users/rdm/rootsrc/gui/fitpanel/src/TFitEditor.cxx:2806:18: warning: variable 'px1old' set but not used [-Wunused-but-set-variable]
   static Int_t  px1old, py1old, px2old, py2old; // to remember the square drawn.
                 ^
4 warnings generated.

Expected behavior

No warnings.

To Reproduce

Compile on macOS with Cocoa.

Setup

Current master.

Additional context

@jalopezg-git jalopezg-git self-assigned this May 12, 2022
ferdymercury added a commit to ferdymercury/root that referenced this issue May 13, 2022
jalopezg-git added a commit that referenced this issue May 16, 2022
#10574)

Remove unused variable warnings in macOS Cocoa builds.

Fixes #10572.

Co-authored-by: Javier Lopez-Gomez <javier.lopez.gomez@cern.ch>
guitargeek pushed a commit to guitargeek/root that referenced this issue Dec 27, 2022
root-project#10574)

Remove unused variable warnings in macOS Cocoa builds.

Fixes root-project#10572.

Co-authored-by: Javier Lopez-Gomez <javier.lopez.gomez@cern.ch>
guitargeek pushed a commit that referenced this issue Dec 28, 2022
#10574)

Remove unused variable warnings in macOS Cocoa builds.

Fixes #10572.

Co-authored-by: Javier Lopez-Gomez <javier.lopez.gomez@cern.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants