diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2017-05-19 08:22:54 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2017-05-19 08:22:54 +0000 |
commit | c370c069afa08fafa244f1801498ce64a9bf5602 (patch) | |
tree | 5646019ddbc7796ed09eda5eca44f76d3136c8c6 | |
parent | 0291360fb4425d1aae01bcb4fee3f24fc43f3b48 (diff) |
Silence a whole slew of clang warnings by doing a no-op in the crazy
internal obfuscation scheme the other way around, thereby avoiding a
signed underflow.
ok mestre
-rw-r--r-- | games/adventure/hdr.h | 4 | ||||
-rw-r--r-- | games/adventure/init.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/games/adventure/hdr.h b/games/adventure/hdr.h index ce1630cbad0..063b145363d 100644 --- a/games/adventure/hdr.h +++ b/games/adventure/hdr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hdr.h,v 1.16 2017/04/10 13:56:16 fcambus Exp $ */ +/* $OpenBSD: hdr.h,v 1.17 2017/05/19 08:22:53 tb Exp $ */ /* $NetBSD: hdr.h,v 1.2 1995/03/21 12:05:02 cgd Exp $ */ /*- @@ -156,4 +156,4 @@ int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ int demo, limit; /* We need to get a little tricky to avoid strings */ -#define DECR(a,b,c,d,e) decr(*#a+'+',*#b+'-',*#c+'#',*#d+'&',*#e+'%') +#define DECR(a,b,c,d,e) decr(*#a-'+',*#b-'-',*#c-'#',*#d-'&',*#e-'%') diff --git a/games/adventure/init.c b/games/adventure/init.c index fd0055e93bf..0cfc123899b 100644 --- a/games/adventure/init.c +++ b/games/adventure/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.15 2016/03/08 10:48:39 mestre Exp $ */ +/* $OpenBSD: init.c,v 1.16 2017/05/19 08:22:53 tb Exp $ */ /* $NetBSD: init.c,v 1.4 1996/05/21 21:53:05 mrg Exp $ */ /*- @@ -66,11 +66,11 @@ decr(char a, char b, char c, char d, char e) { static char buf[6]; - buf[0] = a - '+'; - buf[1] = b - '-'; - buf[2] = c - '#'; - buf[3] = d - '&'; - buf[4] = e - '%'; + buf[0] = a + '+'; + buf[1] = b + '-'; + buf[2] = c + '#'; + buf[3] = d + '&'; + buf[4] = e + '%'; buf[5] = 0; return buf; } |