Skip to content

Instantly share code, notes, and snippets.

@dwbuiten
Last active May 23, 2016 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwbuiten/f29d32e1a71cae8e8cc737829b00e49e to your computer and use it in GitHub Desktop.
Save dwbuiten/f29d32e1a71cae8e8cc737829b00e49e to your computer and use it in GitHub Desktop.
draw.c:30: error: CHECKERS_DEAD_CODE
Node not visited: 20
28. static inline char get_char(char c)
29. {
30. > if (c > 31 && c < 127)
31. return c;
32. else
33.
Original code here: https://github.com/dwbuiten/bxd/blob/master/draw.c#L28-34
This makes it go away / happy, but I cannot figure out WHY:
- if (c > 31 && c < 127)
- return c;
- else
- return '.';
+ return (c > 31 && c < 127) ? c : '.';
Removing the 'else' line 'fixes' it too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment