From 0a6be0a83f368aff7df7e1a9c567d7e16b92a579 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 31 Jan 2016 04:33:54 +0000 Subject: Fix compiler warnings (STR 2988), porting from branch-1.3. This commit is the accumulated patch introduced in branch 1.3 in svn r 11094, 11095, and 11096. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/device.cxx | 2 +- test/fractals.cxx | 4 ++-- test/list_visuals.cxx | 4 +++- test/threads.cxx | 4 ++-- test/threads.h | 4 ++-- test/utf8.cxx | 6 +++--- 6 files changed, 13 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/device.cxx b/test/device.cxx index 971e4eee7..a1c83a53f 100644 --- a/test/device.cxx +++ b/test/device.cxx @@ -3,7 +3,7 @@ // // Device test program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2011 by Roman Kantor and others. +// Copyright 1998-2016 by Roman Kantor and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this diff --git a/test/fractals.cxx b/test/fractals.cxx index 34d3ef92e..5d3f1def3 100644 --- a/test/fractals.cxx +++ b/test/fractals.cxx @@ -7,7 +7,7 @@ // demonstrate how to add FLTK controls to a GLUT program. The GLUT // code is unchanged except for the end (search for FLTK to find changes). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -25,7 +25,7 @@ #include #include int main(int, char**) { - fl_alert("This demo does not work without GL and GLU (%d)"); + fl_alert("This demo does not work without GL and GLU"); return 1; } #else diff --git a/test/list_visuals.cxx b/test/list_visuals.cxx index a9ffdfbfe..42bc36f38 100644 --- a/test/list_visuals.cxx +++ b/test/list_visuals.cxx @@ -11,7 +11,7 @@ // This file may be #included in another program to make a function to // call to list the visuals. Fl.H must be included first to indicate this. // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -37,6 +37,8 @@ int main(int, char**) { #include +#define HAVE_MULTIBUF 0 + #ifndef Fl_H #include diff --git a/test/threads.cxx b/test/threads.cxx index c07b2ea9f..522aa0a9f 100644 --- a/test/threads.cxx +++ b/test/threads.cxx @@ -3,7 +3,7 @@ // // Threading example program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -18,7 +18,7 @@ #include -#if HAVE_PTHREAD || defined(WIN32) +#if defined(HAVE_PTHREAD) || defined(WIN32) # include # include # include diff --git a/test/threads.h b/test/threads.h index 73191459b..d81f1e6a6 100644 --- a/test/threads.h +++ b/test/threads.h @@ -3,7 +3,7 @@ // // Simple threading API for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -34,7 +34,7 @@ #ifndef Threads_H # define Threads_H -# if HAVE_PTHREAD_H +# ifdef HAVE_PTHREAD_H // Use POSIX threading... # include diff --git a/test/utf8.cxx b/test/utf8.cxx index 038ebf1f8..b2c40fcb9 100644 --- a/test/utf8.cxx +++ b/test/utf8.cxx @@ -3,7 +3,7 @@ // // UTF-8 test program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -421,7 +421,7 @@ int make_font_chooser(void) // font_count = Fl::set_fonts("*"); #ifdef WIN32 font_count = Fl::set_fonts("*"); -#elif __APPLE__ +#elif defined(__APPLE__) font_count = Fl::set_fonts("*"); #else // Load the systems available fonts - ask for everything that claims to be @@ -582,7 +582,7 @@ int main(int argc, char** argv) Fl::set_font(extra_font, #ifdef WIN32 " Arial Unicode MS" -#elif __APPLE__ +#elif defined(__APPLE__) "Monaco" #else "-*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1" -- cgit v1.2.3