summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2007-05-20 16:18:31 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2007-05-20 16:18:31 +0000
commitd8c288df3e51f156e9900313ec33b3d4c8ae3f84 (patch)
tree8b01921f52c6e04a28aa735a3fc05141c5de4c09
parent56a50b9f0e7d47cfda34afe7e19dd51c08e3d9ba (diff)
Fix compiler warnings/errors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--FL/Fl.H8
-rw-r--r--configure.in2
-rw-r--r--src/Fl_Text_Display.cxx9
-rw-r--r--src/Fl_Tooltip.cxx3
-rw-r--r--src/fl_call_main.c2
-rw-r--r--src/screen_xywh.cxx68
-rw-r--r--test/blocks.cxx2
7 files changed, 47 insertions, 47 deletions
diff --git a/FL/Fl.H b/FL/Fl.H
index 908e45fcb..da592aab0 100644
--- a/FL/Fl.H
+++ b/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);
diff --git a/configure.in b/configure.in
index 17a14250f..c7c45fc2c 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx
index 61c401d19..d7b312ed7 100644
--- a/src/Fl_Text_Display.cxx
+++ b/src/Fl_Text_Display.cxx
@@ -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);
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx
index 0eb407158..bf100bd9c 100644
--- a/src/Fl_Tooltip.cxx
+++ b/src/Fl_Tooltip.cxx
@@ -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)");
diff --git a/src/fl_call_main.c b/src/fl_call_main.c
index 563d9652b..2b61b62e9 100644
--- a/src/fl_call_main.c
+++ b/src/fl_call_main.c
@@ -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__
diff --git a/src/screen_xywh.cxx b/src/screen_xywh.cxx
index 67694ca4c..a6c98d304 100644
--- a/src/screen_xywh.cxx
+++ b/src/screen_xywh.cxx
@@ -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();
}
diff --git a/test/blocks.cxx b/test/blocks.cxx
index 6c828c04d..90707cc34 100644
--- a/test/blocks.cxx
+++ b/test/blocks.cxx
@@ -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 ++)