Skip to content

Unable to compile with GCC 11.1.0 #17

@parkerlreed

Description

@parkerlreed
(deck@steamdeck 3dfsb)$ pacman -Q gcc gstreamer
gcc 11.1.0-3
gstreamer 1.18.5-1
(deck@steamdeck 3dfsb)$ ./compile.sh 
Usage: ./compile.sh [i386]
Add the i386 option to compile for 32-bit (i386) architectures on a 64-bit machine
Using sdl-config.
Converting built-in images to XPM format with imagemagick's 'mogrify' tool...
Converting other built-in files to .h file format with the xxd tool...
GNU/Linux detected.
Compiling...3dfsb.c: In function ‘display’:
3dfsb.c:2137:33: error: ‘strncpy’ output truncated before terminating nul copying 21 bytes from a string of the same length [-Werror=stringop-truncation]
 2137 |                                 strncpy(open_string, OPEN_STRING, OPEN_STRING_LENGTH);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
input.c: In function ‘keyboard’:
input.c:582:77: error: cast between incompatible function types from ‘Uint32 (*)(void)’ {aka ‘unsigned int (*)(void)’} to ‘Uint32 (*)(Uint32,  void *)’ {aka ‘unsigned int (*)(unsigned int,  void *)’} [-Werror=cast-function-type]
  582 |                                 TDFSB_TIMER_ID = SDL_AddTimer(TDFSB_FPS_DT, (SDL_NewTimerCallback) fps_timer, 0);
      |                                                                             ^
cc1: all warnings being treated as errors
media.c: In function ‘get_image_from_file’:
media.c:292:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
  292 |                 g_print("Failed to pause the file\n");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
media.c:294:9: note: here
  294 |         case GST_STATE_CHANGE_NO_PREROLL:
      |         ^~~~
cc1: all warnings being treated as errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions