We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2074 - a few warnings when compiling
Summary: a few warnings when compiling
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: ARM Android (All)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-29 11:29 UTC by Sylvain
Modified: 2013-08-29 18:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain 2013-08-29 11:29:49 UTC
I got them with CLang + Android
A few warnings, that could be important : 


jni/SDL_hg/src/thread/pthread/SDL_syssem.c:159:36: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
        if ((SDL_GetTicks() - end) >= 0) {
            ~~~~~~~~~~~~~~~~~~~~~~ ^  ~


jni/SDL_hg/src/timer/unix/SDL_systimer.c:164:1: warning: control may reach end of Compile thumb  : SDL2 <= SDL_blit_A.c
non-void function [-Wreturn-type]


jni/SDL_hg/src/video/android/SDL_androidgl.c:41:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
Android_GLES_SwapWindow(_THIS, SDL_Window * window)
^~~~~~~~~~~~~~~~~~~~~~~

jni/SDL_hg/src/video/android/SDL_androidgl.c:47:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Comment 1 Gabriel Jacobo 2013-08-29 17:04:21 UTC
Thanks! http://hg.libsdl.org/SDL/rev/ea5565d856a8
Comment 2 Sylvain 2013-08-29 18:06:25 UTC
...and an minor extra one !

jni/SDL_image_hg/IMG_png.c:499:24: note: remove extraneous parentheses around the comparison to silence this warning
    if ( (row_pointers == NULL) ) {
         ~             ^      ~
jni/SDL_image_hg/IMG_png.c:499:24: note: use '=' to turn this equality comparison into an assignment
    if ( (row_pointers == NULL) ) {


And also:

jni/SDL_image_hg/external/jpeg-9/jmem-android.c:135:5: warning: implicit declaration of function 'unlink' is invalid in C99 [-Wimplicit-function-declaration]
    unlink(path);
    ^
jni/SDL_image_hg/external/jpeg-9/jmem-android.c:141:45: warning: implicit declaration of function 'getpid' is invalid in C99 [-Wimplicit-function-declaration]
    snprintf(path, 1023, "/sdcard/.%d.tmp", getpid());
                                            ^


Thanks !