Skip to content

Commit

Permalink
STR #1152: Fixed Cygwin compiler warnings
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed May 5, 2006
1 parent 48c8932 commit 22b1499
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.8

- Fixed warnings when compiling w/Cygwin (STR #1152)
- Fixed missing reset of flag in FLUID (STR #1187)
- Fixed maximizing in OS X (STR #1221)
- Fixed 'make distclean' to remove binaries inside
Expand Down
2 changes: 2 additions & 0 deletions src/Fl.cxx
Expand Up @@ -270,7 +270,9 @@ static void run_checks()
}
#endif // !__APPLE__

#ifndef WIN32
static char in_idle;
#endif

////////////////////////////////////////////////////////////////
// wait/run/check/ready:
Expand Down
7 changes: 3 additions & 4 deletions src/Fl_win32.cxx
Expand Up @@ -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();

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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]);
Expand Down Expand Up @@ -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, "",
Expand Down
4 changes: 2 additions & 2 deletions src/fl_encoding_latin1.cxx
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 22b1499

Please sign in to comment.