mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
On OS X: disable all 'deprecated' warnings to be able to see the really important warnings. Nevertheless, we will have to replace all Carbon calls as soon as possible. Also re-fixed (i hope) the 'return' from an endless loop in 'threads.cxx'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -889,6 +889,12 @@ if test -n "$GCC"; then
|
|||||||
# The following additional warnings are useful for tracking down problems...
|
# The following additional warnings are useful for tracking down problems...
|
||||||
#OPTIM="-Wshadow -Wconversion $OPTIM"
|
#OPTIM="-Wshadow -Wconversion $OPTIM"
|
||||||
|
|
||||||
|
# We know that Carbon is deprecated on OS X 10.4. To avoid hundreds of warnings
|
||||||
|
# we will temporarily disable 'deprecated' warnings on OS X.
|
||||||
|
if test "$uname" = "Darwin" -a $uversion -ge 800; then
|
||||||
|
OPTIM="-Wno-deprecated-declarations $OPTIM"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the default compiler optimizations...
|
# Set the default compiler optimizations...
|
||||||
if test -z "$DEBUGFLAG"; then
|
if test -z "$DEBUGFLAG"; then
|
||||||
#
|
#
|
||||||
|
|||||||
+1
-1
@@ -735,7 +735,7 @@ BlockWindow::handle(int event) {
|
|||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case FL_PUSH :
|
case FL_PUSH :
|
||||||
mx = w() - Fl::event_x() + BLOCK_SIZE;
|
mx = w() - Fl::event_x() + BLOCK_SIZE;
|
||||||
my = h() - Fl::event_y();
|
my = h() - Fl::event_y();
|
||||||
count = 0;
|
count = 0;
|
||||||
b = 0;
|
b = 0;
|
||||||
|
|||||||
+9
-6
@@ -70,7 +70,14 @@ void* prime_func(void* p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// very simple prime number calculator !
|
// very simple prime number calculator !
|
||||||
for (;;) {
|
//
|
||||||
|
// The return at the end of this function can never be reached and thus
|
||||||
|
// will generate a warning with some compilers, however we need to have
|
||||||
|
// a return statement or other compilers will complain there is no return
|
||||||
|
// statement. To avoid warnings on all compilers, we fool the smart ones
|
||||||
|
// into beleiving that there is a chance that we reach the end by testing
|
||||||
|
// n>=0, knowing that logically, n will never be negative in this context.
|
||||||
|
if (n>=0) for (;;) {
|
||||||
int pp;
|
int pp;
|
||||||
int hn = (int)sqrt((double)n);
|
int hn = (int)sqrt((double)n);
|
||||||
|
|
||||||
@@ -108,11 +115,7 @@ void* prime_func(void* p)
|
|||||||
Fl::unlock();
|
Fl::unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// This return can never be reached and thus will generate a warning with
|
return 0L;
|
||||||
// some compilers, however we need to have a return statement or other
|
|
||||||
// compilers will complain there is no return statement... You can't
|
|
||||||
// win sometimes... :(
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user