Ticket #1851: clean-up-build-with-gcc-4.8.1.patch

File clean-up-build-with-gcc-4.8.1.patch, 7.8 KB (added by Markus, 11 years ago)
  • trunk/build/premake/premake4.lua

    diff -Nur a/trunk/build/premake/premake4.lua b/trunk/build/premake/premake4.lua
    a b  
    218218                    -- enable security features (stack checking etc) that shouldn't have
    219219                    -- a significant effect on performance and can catch bugs
    220220                    "-fstack-protector-all",
     221                    "-U_FORTIFY_SOURCE",    -- (prevent redefinition if it is already set)
    221222                    "-D_FORTIFY_SOURCE=2",
    222223
    223224                    -- always enable strict aliasing (useful in debug builds because of the warnings)
  • trunk/libraries/source/fcollada/include/FCDocument/FCDAnimated.h

    diff -Nur a/trunk/libraries/source/fcollada/include/FCDocument/FCDAnimated.h b/trunk/libraries/source/fcollada/include/FCDocument/FCDAnimated.h
    a b  
    306306    /** Resizes the wanted qualifiers.
    307307        @param qualifiers The new qualifiers for the animated element.
    308308        @param prependDot Whether to prepend the '.' character for all the qualifiers of the animated element. */
    309     void Resize(const StringList& qualifiers = NULL, bool prependDot = true);
     309    void Resize(const StringList& qualifiers = StringList(), bool prependDot = true);
    310310};
    311311
    312312/** The common qualifier lists. */
  • trunk/libraries/source/fcollada/src/FCollada/FCDocument/FCDAnimated.h

    Binärdateien a/trunk/libraries/source/fcollada/lib/libFColladaSD.a and b/trunk/libraries/source/fcollada/lib/libFColladaSD.a sind verschieden.
    Binärdateien a/trunk/libraries/source/fcollada/lib/libFColladaSR.a and b/trunk/libraries/source/fcollada/lib/libFColladaSR.a sind verschieden.
    diff -Nur a/trunk/libraries/source/fcollada/src/FCollada/FCDocument/FCDAnimated.h b/trunk/libraries/source/fcollada/src/FCollada/FCDocument/FCDAnimated.h
    a b  
    306306    /** Resizes the wanted qualifiers.
    307307        @param qualifiers The new qualifiers for the animated element.
    308308        @param prependDot Whether to prepend the '.' character for all the qualifiers of the animated element. */
    309     void Resize(const StringList& qualifiers = NULL, bool prependDot = true);
     309    void Resize(const StringList& qualifiers = StringList(), bool prependDot = true);
    310310};
    311311
    312312/** The common qualifier lists. */
  • trunk/libraries/source/fcollada/src/Makefile

    diff -Nur a/trunk/libraries/source/fcollada/src/Makefile b/trunk/libraries/source/fcollada/src/Makefile
    a b  
    273273    rm -rf output
    274274
    275275-include $(OBJECTS_ALL:.o=.P)
     276
     277.SILENT:
  • trunk/source/graphics/Camera.h

    diff -Nur a/trunk/source/graphics/Camera.h b/trunk/source/graphics/Camera.h
    a b  
    3030// view port
    3131struct SViewPort
    3232{
    33     size_t m_X;
    34     size_t m_Y;
    35     size_t m_Width;
    36     size_t m_Height;
     33    int m_X;
     34    int m_Y;
     35    int m_Width;
     36    int m_Height;
    3737};
    3838
    3939class CCamera
  • trunk/source/lib/code_annotation.h

    diff -Nur a/trunk/source/lib/code_annotation.h b/trunk/source/lib/code_annotation.h
    a b  
    174174//-----------------------------------------------------------------------------
    175175// cassert
    176176
     177#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
     178#define GNU_UNUSED_ATTRIBUTE __attribute__((unused))
     179#else
     180#define GNU_UNUSED_ATTRIBUTE
     181#endif
     182
    177183/**
    178184 * Compile-time assertion. Causes a compile error if the expression
    179185 * evaluates to zero/false.
     
    183189 *
    184190 * @param expr Expression that is expected to evaluate to non-zero at compile-time.
    185191 **/
    186 #define cassert(expr) typedef static_assert_<(expr)>::type UID__
     192#define cassert(expr) typedef static_assert_<(expr)>::type UID__ GNU_UNUSED_ATTRIBUTE
    187193template<bool> struct static_assert_;
    188194template<> struct static_assert_<true>
    189195{
     
    196202 * This version must be used if expr uses a dependent type (e.g. depends on
    197203 * a template parameter).
    198204 **/
    199 #define cassert_dependent(expr) typedef typename static_assert_<(expr)>::type UID__
     205#define cassert_dependent(expr) typedef typename static_assert_<(expr)>::type UID__ GNU_UNUSED_ATTRIBUTE
    200206
    201207/**
    202208 * @copydoc cassert(expr)
  • trunk/source/ps/Replay.cpp

    diff -Nur a/trunk/source/ps/Replay.cpp b/trunk/source/ps/Replay.cpp
    a b  
    170170        }
    171171        else if (type == "cmd")
    172172        {
    173             u32 player;
     173            player_id_t player;
    174174            *m_Stream >> player;
    175175
    176176            std::string line;
  • trunk/source/simulation2/components/CCmpAIManager.cpp

    diff -Nur a/trunk/source/simulation2/components/CCmpAIManager.cpp b/trunk/source/simulation2/components/CCmpAIManager.cpp
    a b  
    963963       
    964964        // Get the territory data
    965965        //  Since getting the territory grid can trigger a recalculation, we check NeedUpdate first
    966         bool territoryMapDirty = false;
    967966        Grid<u8> dummyGrid2;
    968967        const Grid<u8>* territoryMap = &dummyGrid2;
    969968        CmpPtr<ICmpTerritoryManager> cmpTerritoryManager(GetSimContext(), SYSTEM_ENTITY);
    970969        if (cmpTerritoryManager && cmpTerritoryManager->NeedUpdate(&m_TerritoriesDirtyID))
    971970        {
    972971            territoryMap = &cmpTerritoryManager->GetTerritoryGrid();
    973             territoryMapDirty = true;
    974972        }
    975973       
    976974        LoadPathfinderClasses(state);
  • trunk/source/soundmanager/items/CBufferItem.cpp

    diff -Nur a/trunk/source/soundmanager/items/CBufferItem.cpp b/trunk/source/soundmanager/items/CBufferItem.cpp
    a b  
    5959        AL_CHECK
    6060        delete[] al_buf;
    6161    }
    62     alSourcei(m_ALSource, AL_BUFFER, NULL);
     62    alSourcei(m_ALSource, AL_BUFFER, 0);
    6363    ((CSoundManager*)g_SoundManager)->ReleaseALSource(m_ALSource);
    6464    AL_CHECK
    6565
  • trunk/source/soundmanager/items/CSoundBase.cpp

    diff -Nur a/trunk/source/soundmanager/items/CSoundBase.cpp b/trunk/source/soundmanager/items/CSoundBase.cpp
    a b  
    4444    if (m_ALSource != 0)
    4545    {
    4646        AL_CHECK
    47         alSourcei(m_ALSource, AL_BUFFER, NULL);
     47        alSourcei(m_ALSource, AL_BUFFER, 0);
    4848        AL_CHECK
    4949        ((CSoundManager*)g_SoundManager)->ReleaseALSource(m_ALSource);
    5050        AL_CHECK
  • trunk/source/soundmanager/items/CStreamItem.cpp

    diff -Nur a/trunk/source/soundmanager/items/CStreamItem.cpp b/trunk/source/soundmanager/items/CStreamItem.cpp
    a b  
    5555            AL_CHECK
    5656            delete[] al_buf;
    5757        }
    58         alSourcei(m_ALSource, AL_BUFFER, NULL);
     58        alSourcei(m_ALSource, AL_BUFFER, 0);
    5959        AL_CHECK
    6060        ((CSoundManager*)g_SoundManager)->ReleaseALSource(m_ALSource);
    6161        AL_CHECK
  • trunk/source/third_party/mongoose/mongoose.cpp

    diff -Nur a/trunk/source/third_party/mongoose/mongoose.cpp b/trunk/source/third_party/mongoose/mongoose.cpp
    a b  
    19961996  }
    19971997  byteReverse(ctx->in, 14);
    19981998
    1999   ((uint32_t *) ctx->in)[14] = ctx->bits[0];
    2000   ((uint32_t *) ctx->in)[15] = ctx->bits[1];
     1999  memcpy(ctx->in + 14 * sizeof(uint32_t), ctx->bits, sizeof(ctx->bits));
    20012000
    20022001  MD5Transform(ctx->buf, (uint32_t *) ctx->in);
    20032002  byteReverse((unsigned char *) ctx->buf, 4);