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