build-scripts/checker-buildbot.sh
author Sam Lantinga
Tue, 20 Oct 2020 11:51:23 -0700
changeset 14181 5e54294cae9e
parent 13815 8c7bf8f29b8c
permissions -rwxr-xr-x
Fixed bug 5323 - SDL_SetWindowMaximumSize fails if Width or Height is equal to minimum Height or Width

batyastudios

Basicly there is problem and somewhat a solution: https://discourse.libsdl.org/t/setwindowmaximumsize-bug/28267

If you SDL_SetWindowMaximumSize() after SDL_SetWindowMinimumSize() with one of axes have the same value, function will have no effect.

This: (line 2144@SDL_video.c)
if (max_w <= window->min_w || max_h <= window->min_h) {
SDL_SetError("SDL_SetWindowMaximumSize(): Tried to set maximum size smaller than minimum size");
return;
}

May be changed to this:
if (max_w < window->min_w || max_h < window->min_h) {
SDL_SetError("SDL_SetWindowMaximumSize(): Tried to set maximum size smaller than minimum size");
return;
}
     1 #!/bin/bash
     2 
     3 # This is a script used by some Buildbot buildslaves to push the project
     4 #  through Clang's static analyzer and prepare the output to be uploaded
     5 #  back to the buildmaster. You might find it useful too.
     6 
     7 # Install Clang (you already have it on Mac OS X, apt-get install clang
     8 #  on Ubuntu, etc), and make sure scan-build is in your $PATH.
     9 
    10 FINALDIR="$1"
    11 
    12 set -x
    13 set -e
    14 
    15 cd `dirname "$0"`
    16 cd ..
    17 
    18 rm -rf checker-buildbot analysis
    19 if [ ! -z "$FINALDIR" ]; then
    20     rm -rf "$FINALDIR"
    21 fi
    22 
    23 mkdir checker-buildbot
    24 cd checker-buildbot
    25 
    26 # We turn off deprecated declarations, because we don't care about these warnings during static analysis.
    27 # The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
    28 
    29 # You might want to do this for CMake-backed builds instead...
    30 scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
    31 
    32 # ...or run configure without the scan-build wrapper...
    33 #CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
    34 
    35 rm -rf analysis
    36 scan-build -o analysis ninja
    37 
    38 if [ `ls -A analysis |wc -l` == 0 ] ; then
    39     mkdir analysis/zarro
    40     echo '<html><head><title>Zarro boogs</title></head><body>Static analysis: no issues to report.</body></html>' >analysis/zarro/index.html
    41 fi
    42 
    43 mv analysis/* ../analysis
    44 rmdir analysis   # Make sure this is empty.
    45 cd ..
    46 chmod -R a+r analysis
    47 chmod -R go-w analysis
    48 find analysis -type d -exec chmod a+x {} \;
    49 if [ -x /usr/bin/xattr ]; then find analysis -exec /usr/bin/xattr -d com.apple.quarantine {} \; 2>/dev/null ; fi
    50 
    51 if [ ! -z "$FINALDIR" ]; then
    52     mv analysis "$FINALDIR"
    53 else
    54     FINALDIR=analysis
    55 fi
    56 
    57 rm -rf checker-buildbot
    58 
    59 echo "Done. Final output is in '$FINALDIR' ..."
    60 
    61 # end of checker-buildbot.sh ...
    62