forked from github/server
try to allow visual studio to build with all warnings (/WAll) enabled.
This commit is contained in:
parent
2ddd5d242a
commit
838cf3d938
|
@ -1,4 +1,3 @@
|
|||
#include <config.h>
|
||||
#include <platform.h>
|
||||
#include <kernel/unit.h>
|
||||
#include <kernel/region.h>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <platform.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4100)
|
||||
#include "config.pkg.c"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <config.h>
|
||||
#include <platform.h>
|
||||
#include "callback.h"
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -82,7 +82,6 @@ typedef struct faction {
|
|||
int no_units;
|
||||
struct ally *allies;
|
||||
struct group *groups;
|
||||
bool alive; /* enno: sollte ein flag werden */
|
||||
int nregions;
|
||||
int money;
|
||||
#if SCORE_MODULE
|
||||
|
@ -104,6 +103,7 @@ typedef struct faction {
|
|||
struct item *items; /* items this faction can claim */
|
||||
struct seen_region **seen;
|
||||
struct quicklist *seen_factions;
|
||||
bool alive; /* enno: sollte ein flag werden */
|
||||
} faction;
|
||||
|
||||
extern struct faction *factions;
|
||||
|
|
|
@ -193,11 +193,11 @@ extern "C" {
|
|||
|
||||
typedef struct armor_type {
|
||||
const item_type *itype;
|
||||
unsigned int flags;
|
||||
double penalty;
|
||||
double magres;
|
||||
int prot;
|
||||
float projectile; /* chance, dass ein projektil abprallt */
|
||||
unsigned int flags;
|
||||
} armor_type;
|
||||
|
||||
#define WTF_NONE 0x00
|
||||
|
|
|
@ -140,14 +140,13 @@ extern "C" {
|
|||
int at_bonus; /* Verändert den Angriffsskill (default: 0) */
|
||||
int df_bonus; /* Verändert den Verteidigungskill (default: 0) */
|
||||
const struct spell *precombatspell;
|
||||
struct att attack[10];
|
||||
signed char bonus[MAXSKILLS];
|
||||
signed char *study_speed; /* study-speed-bonus in points/turn (0=30 Tage) */
|
||||
bool __remove_me_nonplayer;
|
||||
int flags;
|
||||
int battle_flags;
|
||||
int ec_flags;
|
||||
race_t oldfamiliars[MAXMAGIETYP];
|
||||
struct att attack[10];
|
||||
signed char bonus[MAXSKILLS];
|
||||
|
||||
const char *(*generate_name) (const struct unit *);
|
||||
const char *(*describe) (const struct unit *, const struct locale *);
|
||||
|
|
|
@ -26,7 +26,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifdef _MSC_VER
|
||||
# define VC_EXTRALEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4820 4255 4668)
|
||||
# include <windows.h>
|
||||
# include <io.h>
|
||||
#pragma warning(pop)
|
||||
# undef MOUSE_MOVED
|
||||
# define STDIO_CP 1252 /* log.c, convert to console character set */
|
||||
# pragma warning (disable: 4201 4214 4514 4115 4711)
|
||||
|
@ -41,6 +45,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
# pragma warning(disable: 4996)
|
||||
/* <name> is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' */
|
||||
# pragma warning(disable: 4668)
|
||||
/* <type>: <num> bytes padding after data member <member> */
|
||||
# pragma warning(disable: 4820)
|
||||
|
||||
/* warning C4100: <name> was declared deprecated */
|
||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||
|
@ -113,9 +119,5 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IO_H
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <platform.h>
|
||||
#include <config.h>
|
||||
#include "reports.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <platform.h>
|
||||
#include <CuTest.h>
|
||||
#include "unicode.h"
|
||||
#include <stdlib.h>
|
||||
|
@ -10,7 +11,7 @@ static void test_unicode_tolower(CuTest * tc)
|
|||
CuAssertIntEquals(tc, 0, unicode_utf8_tolower(buffer, sizeof(buffer), "HeLlO W0Rld"));
|
||||
CuAssertStrEquals(tc, "hello w0rld", buffer);
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
buffer[5]='X';
|
||||
buffer[5] = 'X';
|
||||
CuAssertIntEquals(tc, ENOMEM, unicode_utf8_tolower(buffer, 5, "HeLlO W0Rld"));
|
||||
CuAssertStrEquals(tc, "helloX", buffer);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#include <config.h>
|
||||
#include <platform.h>
|
||||
#include "vortex.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue