Skip to content

Commit

Permalink
Adding __attribute__((noreturn)) to rebuild to help static analyzers.
Browse files Browse the repository at this point in the history
  • Loading branch information
marzojr committed Nov 24, 2016
1 parent d3de7b0 commit 6e9674e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/rip.cc
Expand Up @@ -4,6 +4,16 @@
#include <cstring>
using namespace std;

#ifndef ATTR_NORET
#ifdef __GNUC__
#define ATTR_NORET __attribute__((noreturn))
#else
#define ATTR_NORET
#endif
#endif

void rebuild(void) ATTR_NORET;

void rebuild(void) {
unsigned int c;
char s[10];
Expand Down

0 comments on commit 6e9674e

Please sign in to comment.