empserver/include
Markus Armbruster 80bf4ec34b Provide proper build-time assertions for NSC_SITYPE()
We want to cause a diagnostic when NSC_SITYPE()'s argument isn't
implemented.  Commit aa6ad9d's solution is to have the macro expand
into 1/0 then.  Works with GCC, but Clang always warns "division by
zero is undefined".

The better, portable way to conditionally break the build is an array
type with a size that's negative when the build should fail, else
positive.  Implement that wrapped in a sizeof() to make it an
expression as macro BUILD_ASSERT_ONE(), and use it in NSC_SITYPE().

No more warnings from Clang 3.5.0.  GCC still produces its "may be
used uninitialized" false positives.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-12-05 12:42:40 +01:00
..
actofgod.h Update copyright notice 2015-02-28 16:21:34 +01:00
budg.h Update copyright notice 2015-02-28 16:21:34 +01:00
chance.h Fix PRNG seeding to resist guessing 2013-05-08 06:55:21 +02:00
com.h Update copyright notice 2015-02-28 16:21:34 +01:00
combat.h Update copyright notice 2015-02-28 16:21:34 +01:00
commands.h Update copyright notice 2015-02-28 16:21:34 +01:00
commodity.h Update copyright notice 2015-02-28 16:21:34 +01:00
damage.h Update copyright notice 2015-02-28 16:21:34 +01:00
distribute.h Update copyright notice 2015-02-28 16:21:34 +01:00
econfig-spec.h emp_config: Don't monkey-patch WORLD_X to be even 2015-03-02 08:20:52 +01:00
empio.h Update copyright notice 2015-02-28 16:21:34 +01:00
empobj.h Update copyright notice 2015-02-28 16:21:34 +01:00
empthread.h Fix and clean up some comments 2015-12-05 12:31:08 +01:00
file.h Update copyright notice 2015-02-28 16:21:34 +01:00
game.h Update copyright notice 2015-02-28 16:21:34 +01:00
ioqueue.h Update copyright notice 2015-02-28 16:21:34 +01:00
item.h Update copyright notice 2015-02-28 16:21:34 +01:00
journal.h Update copyright notice 2015-02-28 16:21:34 +01:00
land.h subs: De-duplicate formatting in intelligence_report() 2015-03-02 08:20:50 +01:00
loan.h Update copyright notice 2015-02-28 16:21:34 +01:00
lost.h Update copyright notice 2015-02-28 16:21:34 +01:00
lwp.h Update copyright notice 2015-02-28 16:21:34 +01:00
map.h Change comment style to use @foo rather than FOO 2015-12-05 12:13:17 +01:00
match.h Update copyright notice 2015-02-28 16:21:34 +01:00
misc.h Provide proper build-time assertions for NSC_SITYPE() 2015-12-05 12:42:40 +01:00
mission.h Update copyright notice 2015-02-28 16:21:34 +01:00
nat.h Fix and clean up some comments 2015-12-05 12:31:08 +01:00
news.h Update copyright notice 2015-02-28 16:21:34 +01:00
nsc.h Provide proper build-time assertions for NSC_SITYPE() 2015-12-05 12:42:40 +01:00
nuke.h Update copyright notice 2015-02-28 16:21:34 +01:00
optlist.h Improve portability to really outmoded compilers 2015-05-14 09:48:57 +02:00
path.h Update copyright notice 2015-02-28 16:21:34 +01:00
plague.h Update copyright notice 2015-02-28 16:21:34 +01:00
plane.h bomb: Fix ship list header for ASW planes 2015-03-02 08:20:49 +01:00
player.h Update copyright notice 2015-02-28 16:21:34 +01:00
power.h Update copyright notice 2015-02-28 16:21:34 +01:00
product.h Update copyright notice 2015-02-28 16:21:34 +01:00
proto.h Update copyright notice 2015-02-28 16:21:34 +01:00
prototypes.h subs: Change pln_damage()'s parameter noisy to string prefix 2015-03-02 08:20:50 +01:00
queue.h Update copyright notice 2015-02-28 16:21:34 +01:00
retreat.h retreat: Fix group retreat after failed board sinks ship 2015-03-02 08:20:51 +01:00
sect.h Update copyright notice 2015-02-28 16:21:34 +01:00
server.h Update copyright notice 2015-02-28 16:21:34 +01:00
service.h Update copyright notice 2015-02-28 16:21:34 +01:00
ship.h retreat: Rewrite automatic retreat code to fix its many bugs 2015-03-02 08:20:48 +01:00
tel.h Update copyright notice 2015-02-28 16:21:34 +01:00
testing.h Update copyright notice 2015-02-28 16:21:34 +01:00
trade.h Update copyright notice 2015-02-28 16:21:34 +01:00
types.h Update copyright notice 2015-02-28 16:21:34 +01:00
unit.h navigate march: Fix use-after-free and other bugs 2015-03-02 08:20:47 +01:00
update.h Update copyright notice 2015-02-28 16:21:34 +01:00
version.h Update copyright notice 2015-02-28 16:21:34 +01:00
xdump.h Update copyright notice 2015-02-28 16:21:34 +01:00
xy.h Update copyright notice 2015-02-28 16:21:34 +01:00