summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-05-05 14:36:58 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-05-05 14:36:58 +0000
commit22b14999047bf48c2877ac085dc6f97c05d20918 (patch)
treea2d68e76d0e58dff731fb1b40867fc6778bc2136 /src
parent48c8932fd57707ac26e46eb48450584fac14bf98 (diff)
STR #1152: Fixed Cygwin compiler warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx2
-rw-r--r--src/Fl_win32.cxx7
-rw-r--r--src/fl_encoding_latin1.cxx4
3 files changed, 7 insertions, 6 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 72ea71414..60be2bd98 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -270,7 +270,9 @@ static void run_checks()
}
#endif // !__APPLE__
+#ifndef WIN32
static char in_idle;
+#endif
////////////////////////////////////////////////////////////////
// wait/run/check/ready:
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 36372b296..ade91e1c9 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -264,7 +264,7 @@ int fl_wait(double time_to_wait) {
time_to_wait = (time_to_wait > 10000 ? 10000 : time_to_wait);
int t_msec = (int) (time_to_wait * 1000.0 + 0.5);
- int ret_val = MsgWaitForMultipleObjects(0, NULL, FALSE, t_msec, QS_ALLINPUT);
+ MsgWaitForMultipleObjects(0, NULL, FALSE, t_msec, QS_ALLINPUT);
fl_lock_function();
@@ -638,7 +638,6 @@ static void realloc_timers()
if (win32_timer_alloc == 0) {
win32_timer_alloc = 8;
}
- size_t size = sizeof(Win32Timer);
Win32Timer* new_timers = new Win32Timer[win32_timer_alloc * 2];
memmove(new_timers, win32_timers, sizeof(Win32Timer) * win32_timer_used);
Win32Timer* delete_me = win32_timers;
@@ -1336,7 +1335,7 @@ static LRESULT CALLBACK s_TimerProc(HWND hwnd, UINT msg,
case WM_TIMER:
{
unsigned int id = wParam - 1;
- if (id < win32_timer_used && win32_timers[id].handle) {
+ if (id < (unsigned int)win32_timer_used && win32_timers[id].handle) {
Fl_Timeout_Handler cb = win32_timers[id].callback;
void* data = win32_timers[id].data;
delete_timer(win32_timers[id]);
@@ -1385,7 +1384,7 @@ void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void* data)
wc.lpfnWndProc = (WNDPROC)s_TimerProc;
wc.hInstance = fl_display;
wc.lpszClassName = timer_class;
- ATOM atom = RegisterClassEx(&wc);
+ /*ATOM atom =*/ RegisterClassEx(&wc);
// create a zero size window to handle timer events
s_TimerWnd = CreateWindowEx(WS_EX_LEFT | WS_EX_TOOLWINDOW,
timer_class, "",
diff --git a/src/fl_encoding_latin1.cxx b/src/fl_encoding_latin1.cxx
index d3c2c7f05..5191b69d4 100644
--- a/src/fl_encoding_latin1.cxx
+++ b/src/fl_encoding_latin1.cxx
@@ -30,6 +30,8 @@
#include <stdlib.h>
#include "flstring.h"
+#ifdef __APPLE__
+
// These function assume a western code page. If you need to support
// scripts that are not part of this code page, you might want to
// take a look at FLTK2, which uses utf8 for text encoding.
@@ -74,8 +76,6 @@ static uchar roman2latin[256] = {
static char *buf = 0;
static int n_buf = 0;
-#ifdef __APPLE__
-
const char *fl_latin1_to_local(const char *t, int n)
{
if (n==-1) n = strlen(t);