summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-04-03 22:30:59 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-04-03 22:30:59 +0200
commit9a7af1110889036fd88914fe49e65c03dbc01784 (patch)
treeacc74a9b4d87377a7d0d3e525cb651868e4ee803 /src
parent717a7d266b629233255ae0816c5eac8832bd17fb (diff)
Silence compiler warnings [-Wunused-but-set-variable]
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Preferences.cxx1
-rw-r--r--src/Fl_cocoa.mm7
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_color.cxx2
3 files changed, 2 insertions, 8 deletions
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index 27e80564c..d77824ed6 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -1427,6 +1427,7 @@ int Fl_Preferences::Node::write( FILE *f ) {
fputc( '\n', f );
src += cnt;
}
+ (void)written; // silence warning
}
else
fprintf( f, "%s\n", entry_[i].name );
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index d978ebfc1..722472eed 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1775,6 +1775,7 @@ void Fl_Cocoa_Screen_Driver::open_display_platform() {
// We create a thread that does nothing so it completes very fast:
[NSThread detachNewThreadSelector:@selector(doNothing:) toTarget:[FLWindowDelegate singleInstance] withObject:nil];
}
+ (void)localPool; // silence warning
}
}
@@ -3021,8 +3022,6 @@ Fl_X* Fl_Cocoa_Window_Driver::makeWindow()
}
int xp = w->x();
int yp = w->y();
- int wp = w->w();
- int hp = w->h();
int xwm = xp, ywm = yp, bt, bx, by;
@@ -3040,10 +3039,6 @@ Fl_X* Fl_Cocoa_Window_Driver::makeWindow()
winlevel = non_modal_window_level();
}
- if (by+bt) {
- wp += 2*bx;
- hp += 2*by+bt;
- }
if (force_position()) {
if (!Fl::grab()) {
xp = xwm; yp = ywm;
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_color.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_color.cxx
index f11c2955d..8d826e8fb 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_color.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_color.cxx
@@ -33,7 +33,6 @@ extern unsigned fl_cmap[256]; // defined in fl_color.cxx
void Fl_Quartz_Graphics_Driver::color(Fl_Color i) {
Fl_Graphics_Driver::color(i);
- int index;
uchar r, g, b;
if (i & 0xFFFFFF00) {
// translate rgb colors into color index
@@ -42,7 +41,6 @@ void Fl_Quartz_Graphics_Driver::color(Fl_Color i) {
b = i>> 8;
} else {
// translate index into rgb:
- index = i;
unsigned c = fl_cmap[i];
r = c>>24;
g = c>>16;