-
Notifications
You must be signed in to change notification settings - Fork 1
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
compile warnings #48
Comments
LilRiceBaby
added a commit
that referenced
this issue
Dec 2, 2024
Removed unused variable ‘pLabelLocX’, unused variable ‘pEntryLocX’, unused variable ‘pLabelLocY’, unused variable ‘pEntryLocY’, unused variable ‘pLabelLocZ’ and unused variable ‘pEntryLocZ’ for compile warnings issue #48
This may be late, but feel free to resolve this in any way you consider appropriate.
…--bud davis
________________________________
From: Robin Su ***@***.***>
Sent: Monday, December 2, 2024 1:18 PM
To: utastudents/jsbsimedit ***@***.***>
Cc: Davis, Jimmie Bud ***@***.***>; Author ***@***.***>
Subject: Re: [utastudents/jsbsimedit] compile warnings (Issue #48)
[External]
To address the warnings related to unused variables (pLabelLocX, pEntryLocX, etc.) in PropulsionSubsystem::Create function, we can either integrate these widgets into the application UI or remove them if they are unnecessary.
The following variables are declared but not utilized:
pLabelLocX and pEntryLocX
pLabelLocY and pEntryLocY
pLabelLocZ and pEntryLocZ
These widgets seem intended for a "Location" UI element associated with the tank, but they are not added to the grid (m_Grid) or connected to any signal handlers.
Solution Options:
1. Integrate These Widgets into the UI
If these widgets are necessary for tank location input, we can attach them to the grid and make them part of the UI.
Here's an example of how we can add them to the grid:
// Attach location labels and entries to the grid
m_Grid.attach(*pLabelLocX, 2, 0, 1, 1); // X label
m_Grid.attach(*pEntryLocX, 2, 1, 1, 1); // X entry
m_Grid.attach(*pLabelLocY, 3, 0, 1, 1); // Y label
m_Grid.attach(*pEntryLocY, 3, 1, 1, 1); // Y entry
m_Grid.attach(*pLabelLocZ, 4, 0, 1, 1); // Z label
m_Grid.attach(*pEntryLocZ, 4, 1, 1, 1); // Z entry
After attaching, show these widgets:
pLabelLocX->show();
pEntryLocX->show();
pLabelLocY->show();
pEntryLocY->show();
pLabelLocZ->show();
pEntryLocZ->show();
—
Reply to this email directly, view it on GitHub<#48 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADJJC3MACSX3KBPRCEEFVQ32DSW65AVCNFSM6AAAAABSTYTBL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJSGUZTCNJTGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[ 30%] Building CXX object CMakeFiles/JSBSimEdit.dir/src/Propulsion/PropulsionSubsystem.cpp.o
/home/bdavis/jsbsimedit/src/Propulsion/PropulsionSubsystem.cpp: In member function ‘virtual void PropulsionSubsystem::Create()’:
/home/bdavis/jsbsimedit/src/Propulsion/PropulsionSubsystem.cpp:175:17: warning: unused variable ‘pLabelLocX’ [-Wunused-variable]
175 | Gtk::Label* pLabelLocX = Gtk::make_managedGtk::Label("Location X:");
| ^~~~~~~~~~
/home/bdavis/jsbsimedit/src/Propulsion/PropulsionSubsystem.cpp:176:17: warning: unused variable ‘pEntryLocX’ [-Wunused-variable]
176 | Gtk::Entry* pEntryLocX = Gtk::make_managedGtk::Entry();
| ^~~~~~~~~~
/home/bdavis/jsbsimedit/src/Propulsion/PropulsionSubsystem.cpp:178:17: warning: unused variable ‘pLabelLocY’ [-Wunused-variable]
178 | Gtk::Label* pLabelLocY = Gtk::make_managedGtk::Label("Location Y:");
| ^~~~~~~~~~
/home/bdavis/jsbsimedit/src/Propulsion/PropulsionSubsystem.cpp:179:17: warning: unused variable ‘pEntryLocY’ [-Wunused-variable]
179 | Gtk::Entry* pEntryLocY = Gtk::make_managedGtk::Entry();
| ^~~~~~~~~~
/home/bdavis/jsbsimedit/src/Propulsion/PropulsionSubsystem.cpp:181:17: warning: unused variable ‘pLabelLocZ’ [-Wunused-variable]
181 | Gtk::Label* pLabelLocZ = Gtk::make_managedGtk::Label("Location Z:");
| ^~~~~~~~~~
/home/bdavis/jsbsimedit/src/Propulsion/PropulsionSubsystem.cpp:182:17: warning: unused variable ‘pEntryLocZ’ [-Wunused-variable]
182 | Gtk::Entry* pEntryLocZ = Gtk::make_managedGtk::Entry();
| ^~~~~~~~~~
[ 30%] Building CXX object CMakeFiles/JSBSimEdit.dir/src/Propulsion/Tank.cpp.o
[ 31%] Building CXX object CMakeFiles/JSBSimEdit.dir/src/Propulsion/TankDialog.cpp.o
[ 31%] Building CXX object CMakeFiles/JSBSimEdit.dir/src/Propulsion/Thruster.cpp.
The text was updated successfully, but these errors were encountered: