mirror of https://github.com/fltk/fltk
Fix compiler warnings/errors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
56a50b9f0e
commit
d8c288df3e
8
FL/Fl.H
8
FL/Fl.H
|
@ -212,11 +212,11 @@ public:
|
|||
|
||||
// multi-head support:
|
||||
static int screen_count();
|
||||
static void screen_xywh(int &x, int &y, int &w, int &h) {
|
||||
screen_xywh(x, y, w, h, e_x_root, e_y_root);
|
||||
static void screen_xywh(int &X, int &Y, int &W, int &H) {
|
||||
screen_xywh(X, Y, W, H, e_x_root, e_y_root);
|
||||
}
|
||||
static void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my);
|
||||
static void screen_xywh(int &x, int &y, int &w, int &h, int n);
|
||||
static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
|
||||
static void screen_xywh(int &X, int &Y, int &W, int &H, int n);
|
||||
|
||||
// color map:
|
||||
static void set_color(Fl_Color, uchar, uchar, uchar);
|
||||
|
|
|
@ -887,7 +887,7 @@ if test -n "$GCC"; then
|
|||
OPTIM="-Wall -Wunused -Wno-format-y2k $OPTIM"
|
||||
|
||||
# The following additional warnings are useful for tracking down problems...
|
||||
OPTIM="-Wshadow -Wconversion $OPTIM"
|
||||
#OPTIM="-Wshadow -Wconversion $OPTIM"
|
||||
|
||||
# Set the default compiler optimizations...
|
||||
if test -z "$DEBUGFLAG"; then
|
||||
|
|
|
@ -2571,7 +2571,7 @@ void Fl_Text_Display::measure_deleted_lines(int pos, int nDeleted) {
|
|||
int nVisLines = mNVisibleLines;
|
||||
int *lineStarts = mLineStarts;
|
||||
int countFrom, lineStart;
|
||||
int visLineNum = 0, nLines = 0, i;
|
||||
int nLines = 0, i;
|
||||
/*
|
||||
** Determine where to begin searching: either the previous newline, or
|
||||
** if possible, limit to the start of the (original) previous displayed
|
||||
|
@ -2581,11 +2581,8 @@ void Fl_Text_Display::measure_deleted_lines(int pos, int nDeleted) {
|
|||
for (i=nVisLines-1; i>0; i--)
|
||||
if (lineStarts[i] != -1 && pos >= lineStarts[i])
|
||||
break;
|
||||
if (i > 0) {
|
||||
countFrom = lineStarts[i-1];
|
||||
visLineNum = i-1;
|
||||
} else
|
||||
countFrom = buf->line_start(pos);
|
||||
if (i > 0) countFrom = lineStarts[i-1];
|
||||
else countFrom = buf->line_start(pos);
|
||||
} else
|
||||
countFrom = buf->line_start(pos);
|
||||
|
||||
|
|
|
@ -206,6 +206,9 @@ Fl_Tooltip::exit_(Fl_Widget *w) {
|
|||
void
|
||||
Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t)
|
||||
{
|
||||
(void)x;
|
||||
(void)w;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Fl_Tooltip::enter_area(wid=%p, x=%d, y=%d, w=%d, h=%d, t=\"%s\")\n",
|
||||
wid, x, y, w, h, t ? t : "(null)");
|
||||
|
|
|
@ -96,7 +96,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||
return rc;
|
||||
}
|
||||
|
||||
#elif defined(__future_compiler_test)
|
||||
#elif defined(__hpux)
|
||||
/* This code to prevent "empty translation unit" or similar warnings... */
|
||||
static void dummy(void) {}
|
||||
#endif // WIN32 && !FL_DLL && !__GNUC__
|
||||
|
|
|
@ -149,7 +149,7 @@ int Fl::screen_count() {
|
|||
}
|
||||
|
||||
// Return the screen bounding rect for the given mouse position...
|
||||
void Fl::screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) {
|
||||
void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my) {
|
||||
if (!num_screens) screen_init();
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -159,10 +159,10 @@ void Fl::screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) {
|
|||
for (i = 0; i < num_screens; i ++) {
|
||||
if (mx >= screens[i].left && mx < screens[i].right &&
|
||||
my >= screens[i].top && my < screens[i].bottom) {
|
||||
x = screens[i].left;
|
||||
y = screens[i].top;
|
||||
w = screens[i].right - screens[i].left;
|
||||
h = screens[i].bottom - screens[i].top;
|
||||
X = screens[i].left;
|
||||
Y = screens[i].top;
|
||||
W = screens[i].right - screens[i].left;
|
||||
H = screens[i].bottom - screens[i].top;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -176,10 +176,10 @@ void Fl::screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) {
|
|||
mx < (screens[i].x + screens[i].width) &&
|
||||
my >= screens[i].y &&
|
||||
my < (screens[i].y + screens[i].height)) {
|
||||
x = screens[i].x;
|
||||
y = screens[i].y;
|
||||
w = screens[i].width;
|
||||
h = screens[i].height;
|
||||
X = screens[i].x;
|
||||
Y = screens[i].y;
|
||||
W = screens[i].width;
|
||||
H = screens[i].height;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -193,10 +193,10 @@ void Fl::screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) {
|
|||
mx < (screens[i].x_org + screens[i].width) &&
|
||||
my >= screens[i].y_org &&
|
||||
my < (screens[i].y_org + screens[i].height)) {
|
||||
x = screens[i].x_org;
|
||||
y = screens[i].y_org;
|
||||
w = screens[i].width;
|
||||
h = screens[i].height;
|
||||
X = screens[i].x_org;
|
||||
Y = screens[i].y_org;
|
||||
W = screens[i].width;
|
||||
H = screens[i].height;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -206,48 +206,48 @@ void Fl::screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) {
|
|||
(void)my;
|
||||
#endif // WIN32
|
||||
|
||||
x = Fl::x();
|
||||
y = Fl::y();
|
||||
w = Fl::w();
|
||||
h = Fl::h();
|
||||
X = Fl::x();
|
||||
Y = Fl::y();
|
||||
W = Fl::w();
|
||||
H = Fl::h();
|
||||
}
|
||||
|
||||
// Return the screen bounding rect for the given screen...
|
||||
void Fl::screen_xywh(int &x, int &y, int &w, int &h, int n) {
|
||||
void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int n) {
|
||||
if (!num_screens) screen_init();
|
||||
|
||||
#ifdef WIN32
|
||||
if (num_screens > 1 && n >= 0 && n < num_screens) {
|
||||
x = screens[n].left;
|
||||
y = screens[n].top;
|
||||
w = screens[n].right - screens[n].left;
|
||||
h = screens[n].bottom - screens[n].top;
|
||||
X = screens[n].left;
|
||||
Y = screens[n].top;
|
||||
W = screens[n].right - screens[n].left;
|
||||
H = screens[n].bottom - screens[n].top;
|
||||
return;
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
if (num_screens > 1 && n >= 0 && n < num_screens) {
|
||||
x = screens[n].x;
|
||||
y = screens[n].y;
|
||||
w = screens[n].width;
|
||||
h = screens[n].height;
|
||||
X = screens[n].x;
|
||||
Y = screens[n].y;
|
||||
W = screens[n].width;
|
||||
H = screens[n].height;
|
||||
return;
|
||||
}
|
||||
#elif HAVE_XINERAMA
|
||||
if (num_screens > 1 && n >= 0 && n < num_screens) {
|
||||
x = screens[n].x_org;
|
||||
y = screens[n].y_org;
|
||||
w = screens[n].width;
|
||||
h = screens[n].height;
|
||||
X = screens[n].x_org;
|
||||
Y = screens[n].y_org;
|
||||
W = screens[n].width;
|
||||
H = screens[n].height;
|
||||
return;
|
||||
}
|
||||
#else
|
||||
(void)n;
|
||||
#endif // WIN32
|
||||
|
||||
x = Fl::x();
|
||||
y = Fl::y();
|
||||
w = Fl::w();
|
||||
h = Fl::h();
|
||||
X = Fl::x();
|
||||
Y = Fl::y();
|
||||
W = Fl::w();
|
||||
H = Fl::h();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -738,7 +738,7 @@ BlockWindow::handle(int event) {
|
|||
mx = w() - Fl::event_x() + BLOCK_SIZE;
|
||||
my = h() - Fl::event_y();
|
||||
count = 0;
|
||||
b = c->blocks;
|
||||
b = 0;
|
||||
|
||||
for (j = 0, c = columns_; !count && j < num_columns_; j ++, c ++)
|
||||
for (k = 0, b = c->blocks; !count && k < c->num_blocks; k ++, b ++)
|
||||
|
|
Loading…
Reference in New Issue