mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
Silence compiler warnings [-Wunused-but-set-variable]
This commit is contained in:
@@ -3559,6 +3559,7 @@ png_image_read_background(png_voidp argument)
|
|||||||
}
|
}
|
||||||
|
|
||||||
row += display->row_bytes;
|
row += display->row_bytes;
|
||||||
|
(void)row; // FLTK: silence warning: FIXME - remove variable 'row'?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1427,6 +1427,7 @@ int Fl_Preferences::Node::write( FILE *f ) {
|
|||||||
fputc( '\n', f );
|
fputc( '\n', f );
|
||||||
src += cnt;
|
src += cnt;
|
||||||
}
|
}
|
||||||
|
(void)written; // silence warning
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fprintf( f, "%s\n", entry_[i].name );
|
fprintf( f, "%s\n", entry_[i].name );
|
||||||
|
|||||||
+1
-6
@@ -1775,6 +1775,7 @@ void Fl_Cocoa_Screen_Driver::open_display_platform() {
|
|||||||
// We create a thread that does nothing so it completes very fast:
|
// We create a thread that does nothing so it completes very fast:
|
||||||
[NSThread detachNewThreadSelector:@selector(doNothing:) toTarget:[FLWindowDelegate singleInstance] withObject:nil];
|
[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 xp = w->x();
|
||||||
int yp = w->y();
|
int yp = w->y();
|
||||||
int wp = w->w();
|
|
||||||
int hp = w->h();
|
|
||||||
|
|
||||||
int xwm = xp, ywm = yp, bt, bx, by;
|
int xwm = xp, ywm = yp, bt, bx, by;
|
||||||
|
|
||||||
@@ -3040,10 +3039,6 @@ Fl_X* Fl_Cocoa_Window_Driver::makeWindow()
|
|||||||
winlevel = non_modal_window_level();
|
winlevel = non_modal_window_level();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (by+bt) {
|
|
||||||
wp += 2*bx;
|
|
||||||
hp += 2*by+bt;
|
|
||||||
}
|
|
||||||
if (force_position()) {
|
if (force_position()) {
|
||||||
if (!Fl::grab()) {
|
if (!Fl::grab()) {
|
||||||
xp = xwm; yp = ywm;
|
xp = xwm; yp = ywm;
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ extern unsigned fl_cmap[256]; // defined in fl_color.cxx
|
|||||||
|
|
||||||
void Fl_Quartz_Graphics_Driver::color(Fl_Color i) {
|
void Fl_Quartz_Graphics_Driver::color(Fl_Color i) {
|
||||||
Fl_Graphics_Driver::color(i);
|
Fl_Graphics_Driver::color(i);
|
||||||
int index;
|
|
||||||
uchar r, g, b;
|
uchar r, g, b;
|
||||||
if (i & 0xFFFFFF00) {
|
if (i & 0xFFFFFF00) {
|
||||||
// translate rgb colors into color index
|
// translate rgb colors into color index
|
||||||
@@ -42,7 +41,6 @@ void Fl_Quartz_Graphics_Driver::color(Fl_Color i) {
|
|||||||
b = i>> 8;
|
b = i>> 8;
|
||||||
} else {
|
} else {
|
||||||
// translate index into rgb:
|
// translate index into rgb:
|
||||||
index = i;
|
|
||||||
unsigned c = fl_cmap[i];
|
unsigned c = fl_cmap[i];
|
||||||
r = c>>24;
|
r = c>>24;
|
||||||
g = c>>16;
|
g = c>>16;
|
||||||
|
|||||||
Reference in New Issue
Block a user