Skip to content

Fails to build with Clang #27

Open
@RossComputerGuy

Description

directfb> ../../lib/direct/util.h:223:6: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
directfb>   223 |      register int ret = 0;
directfb>       |      ^~~~~~~~
directfb> ../../lib/direct/util.h:328:6: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
directfb>   328 |      register int ret = 0;
directfb>       |      ^~~~~~~~
directfb> In file included from String.cpp:37:
directfb> ./String.h:126:51: error: format argument not a string type
directfb>   126 |      PrintF( const _CharT *format, ... )          D_FORMAT_PRINTF(2);
directfb>       |              ~~~~~~~~~~~~~~~~~~~~                 ^               ~
directfb> ../../lib/direct/util.h:102:51: note: expanded from macro 'D_FORMAT_PRINTF'
directfb>   102 | #define D_FORMAT_PRINTF(n)         __attribute__((__format__ (__printf__, n, n+1)))
directfb>       |                                                   ^                       ~
directfb> In file included from String.cpp:37:
directfb> ./String.h:131:55: error: format argument not a string type
directfb>   131 |      static StringBase F( const _CharT *format, ... ) D_FORMAT_PRINTF(1);
directfb>       |                           ~~~~~~~~~~~~~~~~~~~~        ^               ~
directfb> ../../lib/direct/util.h:102:51: note: expanded from macro 'D_FORMAT_PRINTF'
directfb>   102 | #define D_FORMAT_PRINTF(n)         __attribute__((__format__ (__printf__, n, n+1)))
directfb>       |                                                   ^                       ~
directfb> String.cpp:111:19: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
directfb>   111 |      char     buf[stack_buffer];
directfb>       |                   ^~~~~~~~~~~~
directfb> String.cpp:111:19: note: function parameter 'stack_buffer' with unknown value cannot be used in a constant expression
directfb> String.cpp:108:58: note: declared here
directfb>   108 | String::PrintF( const char *format, va_list args, size_t stack_buffer )
directfb>       |                                                          ^
directfb> 3 warnings and 2 errors generated.
directfb> make[4]: *** [Makefile:918: String.lo] Error 1
directfb> make[4]: Leaving directory '/build/source/lib/direct'
directfb> make[3]: *** [Makefile:975: all-recursive] Error 1
directfb> make[3]: Leaving directory '/build/source/lib/direct'
directfb> make[2]: *** [Makefile:513: all-recursive] Error 1
directfb> make[2]: Leaving directory '/build/source/lib'
directfb> make[1]: *** [Makefile:704: all-recursive] Error 1
directfb> make[1]: Leaving directory '/build/source'
directfb> make: *** [Makefile:572: all] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions