diff options
author | simonb <simonb> | 2006-04-24 14:29:21 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-24 14:29:21 (GMT) |
commit | acf4326f3cc3451aaf874b0b0777d69be5834e57 (patch) | |
tree | 8abf3c4158ece9c97c3764d7eb4eb9e1aa53bf84 | |
parent | f6a072430d4de159e229d6172adc5ba5ae985512 (diff) | |
download | fluxbox_lack-acf4326f3cc3451aaf874b0b0777d69be5834e57.zip fluxbox_lack-acf4326f3cc3451aaf874b0b0777d69be5834e57.tar.bz2 |
Use -Wall when --enable-debug and some warning fixes
+ thanks Jonas Koelker
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | src/ClockTool.cc | 2 | ||||
-rw-r--r-- | src/Ewmh.cc | 8 | ||||
-rw-r--r-- | src/FbTk/FbWindow.hh | 1 | ||||
-rw-r--r-- | src/FbTk/SignalHandler.hh | 1 | ||||
-rw-r--r-- | src/LayerMenu.hh | 1 | ||||
-rw-r--r-- | src/PlacementStrategy.hh | 1 | ||||
-rw-r--r-- | src/Window.cc | 3 | ||||
-rw-r--r-- | src/main.cc | 7 |
10 files changed, 20 insertions, 11 deletions
@@ -1,6 +1,11 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.16: | 2 | Changes for 0.9.16: |
3 | *06/04/24: | 3 | *06/04/24: |
4 | * Use -Wall when --enable-debug and some warning fixes | ||
5 | (Simon + thanks Jonas Koelker) | ||
6 | configure.in ClockTool.cc main.cc Ewmh.cc Window.cc | ||
7 | PlacementStrategy.hh LayerMenu.hh FbTk/SignalHandler.hh | ||
8 | FbTk/FbWindow.hh | ||
4 | * Fix memory leaks & other errors in Menu code (Simon) | 9 | * Fix memory leaks & other errors in Menu code (Simon) |
5 | Screen.cc Slit.cc Toolbar.cc fluxbox.cc MenuCreator.cc FbTk/Menu.cc | 10 | Screen.cc Slit.cc Toolbar.cc fluxbox.cc MenuCreator.cc FbTk/Menu.cc |
6 | * Use external tabs by default (Simon) | 11 | * Use external tabs by default (Simon) |
diff --git a/configure.in b/configure.in index 5f6d4f0..5659ef6 100644 --- a/configure.in +++ b/configure.in | |||
@@ -320,7 +320,7 @@ AC_ARG_ENABLE(debug, | |||
320 | [ --enable-debug include verbose debugging code [default=no]], | 320 | [ --enable-debug include verbose debugging code [default=no]], |
321 | if test x$enableval = "xyes"; then | 321 | if test x$enableval = "xyes"; then |
322 | AC_MSG_RESULT([yes]) | 322 | AC_MSG_RESULT([yes]) |
323 | DEBUG="-DDEBUG" | 323 | DEBUG="-DDEBUG -Wall" |
324 | else | 324 | else |
325 | AC_MSG_RESULT([no]) | 325 | AC_MSG_RESULT([no]) |
326 | fi, | 326 | fi, |
diff --git a/src/ClockTool.cc b/src/ClockTool.cc index e4b6c0c..2c0ad46 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc | |||
@@ -257,7 +257,7 @@ void ClockTool::updateTime() { | |||
257 | return; | 257 | return; |
258 | m_button.setText(time_string); | 258 | m_button.setText(time_string); |
259 | 259 | ||
260 | int new_width = m_theme.font().textWidth(time_string, time_string_len) + 2; | 260 | unsigned int new_width = m_theme.font().textWidth(time_string, time_string_len) + 2; |
261 | if (new_width > m_button.width()) { | 261 | if (new_width > m_button.width()) { |
262 | resize(new_width, m_button.height()); | 262 | resize(new_width, m_button.height()); |
263 | resizeSig().notify(); | 263 | resizeSig().notify(); |
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 96722d1..6bcd3e6 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -267,8 +267,8 @@ void Ewmh::setupFrame(FluxboxWindow &win) { | |||
267 | if (win.winClient().property(m_net_wm_desktop, 0, 1, False, XA_CARDINAL, | 267 | if (win.winClient().property(m_net_wm_desktop, 0, 1, False, XA_CARDINAL, |
268 | &ret_type, &fmt, &nitems, &bytes_after, | 268 | &ret_type, &fmt, &nitems, &bytes_after, |
269 | (unsigned char **) &data) && data) { | 269 | (unsigned char **) &data) && data) { |
270 | unsigned int desktop = static_cast<unsigned int>(*data); | 270 | unsigned int desktop = static_cast<long>(*data); |
271 | if (desktop == 0xFFFFFFFF && !win.isStuck()) | 271 | if (desktop == -1 && !win.isStuck()) |
272 | win.stick(); | 272 | win.stick(); |
273 | else | 273 | else |
274 | win.setWorkspace(desktop); | 274 | win.setWorkspace(desktop); |
@@ -634,7 +634,7 @@ void Ewmh::updateWorkspace(FluxboxWindow &win) { | |||
634 | long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); | 634 | long workspace = win.isInitialized() ? win.workspaceNumber() : win.screen().currentWorkspaceID(); |
635 | 635 | ||
636 | if (win.isStuck()) | 636 | if (win.isStuck()) |
637 | workspace = 0xFFFFFFFF; // appear on all desktops/workspaces | 637 | workspace = -1; // appear on all desktops/workspaces |
638 | 638 | ||
639 | FluxboxWindow::ClientList::iterator it = win.clientList().begin(); | 639 | FluxboxWindow::ClientList::iterator it = win.clientList().begin(); |
640 | FluxboxWindow::ClientList::iterator it_end = win.clientList().end(); | 640 | FluxboxWindow::ClientList::iterator it_end = win.clientList().end(); |
@@ -661,7 +661,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, | |||
661 | 661 | ||
662 | // if it's stick, make sure it is stuck. | 662 | // if it's stick, make sure it is stuck. |
663 | // otherwise, make sure it isn't stuck | 663 | // otherwise, make sure it isn't stuck |
664 | if (ce.data.l[0] == 0xFFFFFFFF) { | 664 | if (ce.data.l[0] == -1) { |
665 | if (!fbwin->isStuck()) | 665 | if (!fbwin->isStuck()) |
666 | fbwin->stick(); | 666 | fbwin->stick(); |
667 | return true; | 667 | return true; |
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 3a5d18d..8f7376c 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh | |||
@@ -266,6 +266,7 @@ private: | |||
266 | class FbWindowRenderer { | 266 | class FbWindowRenderer { |
267 | public: | 267 | public: |
268 | virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0; | 268 | virtual void renderForeground(FbWindow &win, FbDrawable &drawable) = 0; |
269 | virtual ~FbWindowRenderer() { } | ||
269 | }; | 270 | }; |
270 | 271 | ||
271 | 272 | ||
diff --git a/src/FbTk/SignalHandler.hh b/src/FbTk/SignalHandler.hh index 23bac97..7b013cf 100644 --- a/src/FbTk/SignalHandler.hh +++ b/src/FbTk/SignalHandler.hh | |||
@@ -33,6 +33,7 @@ namespace FbTk { | |||
33 | class SignalEventHandler { | 33 | class SignalEventHandler { |
34 | public: | 34 | public: |
35 | virtual void handleSignal(int signum) = 0; | 35 | virtual void handleSignal(int signum) = 0; |
36 | virtual ~SignalEventHandler() { } | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | /// Handles system signals, singleton. | 39 | /// Handles system signals, singleton. |
diff --git a/src/LayerMenu.hh b/src/LayerMenu.hh index e22ba30..724e7bc 100644 --- a/src/LayerMenu.hh +++ b/src/LayerMenu.hh | |||
@@ -34,6 +34,7 @@ class LayerObject { | |||
34 | public: | 34 | public: |
35 | virtual void moveToLayer(int layer_number) = 0; | 35 | virtual void moveToLayer(int layer_number) = 0; |
36 | virtual int layerNumber() const = 0; | 36 | virtual int layerNumber() const = 0; |
37 | virtual ~LayerObject() { } | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | 40 | ||
diff --git a/src/PlacementStrategy.hh b/src/PlacementStrategy.hh index 19376ca..001218d 100644 --- a/src/PlacementStrategy.hh +++ b/src/PlacementStrategy.hh | |||
@@ -40,6 +40,7 @@ struct PlacementStrategy { | |||
40 | virtual bool placeWindow(const std::vector<FluxboxWindow *> &windowlist, | 40 | virtual bool placeWindow(const std::vector<FluxboxWindow *> &windowlist, |
41 | const FluxboxWindow &win, | 41 | const FluxboxWindow &win, |
42 | int &place_x, int &place_y) = 0; | 42 | int &place_x, int &place_y) = 0; |
43 | virtual ~PlacementStrategy() { } | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | #endif // PLACEMENTSTRATEGY_HH | 46 | #endif // PLACEMENTSTRATEGY_HH |
diff --git a/src/Window.cc b/src/Window.cc index 7ffc1d5..31f4374 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -3378,7 +3378,7 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) { | |||
3378 | 3378 | ||
3379 | // test against tabs too | 3379 | // test against tabs too |
3380 | bool i_have_tabs = frame().externalTabMode(); | 3380 | bool i_have_tabs = frame().externalTabMode(); |
3381 | int xoff,yoff,woff,hoff; | 3381 | int xoff = 0, yoff = 0, woff = 0, hoff = 0; |
3382 | if (i_have_tabs) { | 3382 | if (i_have_tabs) { |
3383 | xoff = xOffset(); | 3383 | xoff = xOffset(); |
3384 | yoff = yOffset(); | 3384 | yoff = yOffset(); |
@@ -3386,7 +3386,6 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) { | |||
3386 | hoff = heightOffset(); | 3386 | hoff = heightOffset(); |
3387 | } | 3387 | } |
3388 | 3388 | ||
3389 | |||
3390 | ///////////////////////////////////// | 3389 | ///////////////////////////////////// |
3391 | // begin by checking the screen (or Xinerama head) edges | 3390 | // begin by checking the screen (or Xinerama head) edges |
3392 | 3391 | ||
diff --git a/src/main.cc b/src/main.cc index fedc3a9..b458fbf 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -304,9 +304,10 @@ int main(int argc, char **argv) { | |||
304 | cerr.rdbuf(errbuf); | 304 | cerr.rdbuf(errbuf); |
305 | 305 | ||
306 | if (restarting) { | 306 | if (restarting) { |
307 | if (restart_argument.c_str()) { | 307 | const char *arg = restart_argument.c_str(); |
308 | execlp(restart_argument.c_str(), restart_argument.c_str(), 0); | 308 | if (arg) { |
309 | perror(restart_argument.c_str()); | 309 | execlp(arg, arg, (char *) NULL); |
310 | perror(arg); | ||
310 | } | 311 | } |
311 | 312 | ||
312 | // fall back in case the above execlp doesn't work | 313 | // fall back in case the above execlp doesn't work |