Skip to content

Commit

Permalink
schism: drop NORETURN attribute use
Browse files Browse the repository at this point in the history
This is just generating pointless noise from gcc:

```
gcc -DHAVE_CONFIG_H -I. -I..  -D_USE_AUTOCONF -D_GNU_SOURCE -I../include -I.  -I/usr/include/SDL2 -D_REENTRANT -DUSE_ALSA -DUSE_DLTRICK_ALSA -DUSE_OSS -DUSE_NETWORK -DUSE_X11 -DUSE_XV -DHAS_YM3812=1 -DHAS_Y8950=0 -DHAS_YM3526=0     -DUSE_FLAC -DUSE_ROCKET -g -O2 -MT schism/main.o -MD -MP -MF $depbase.Tpo -c -o schism/main.o ../schism/main.c &&\
mv -f $depbase.Tpo $depbase.Po
../schism/main.c: In function ‘event_loop’:
../schism/main.c:1086:1: warning: ‘noreturn’ function does return
 1086 | }
      | ^
```

I see no obvious reason why it's important for the compiler to be
informed of event_loop()'s not returning, and right now it's just
adding a false-positive warning to the build.
  • Loading branch information
vcaputo committed Feb 26, 2023
1 parent 584a939 commit a01687b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions include/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@
# ifndef UNUSED
# define UNUSED __attribute__((unused))
# endif
# ifndef NORETURN
# define NORETURN __attribute__((noreturn))
# endif
# ifndef PACKED
# define PACKED __attribute__((packed))
# endif
Expand All @@ -69,9 +66,6 @@
# ifndef PACKED
# define PACKED
# endif
# ifndef NORETURN
# define NORETURN
# endif
# ifndef LIKELY
# define LIKELY(x)
# endif
Expand Down
1 change: 0 additions & 1 deletion schism/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ static void key_event_reset(struct key_event *kk, int start_x, int start_y)
kk->sy = start_y;
}

static void event_loop(void) NORETURN;
static void event_loop(void)
{
SDL_Event event;
Expand Down

0 comments on commit a01687b

Please sign in to comment.