Merge branch 'develop' of github.com:badgerman/eressea into develop

This commit is contained in:
Enno Rehling 2015-05-17 17:23:10 +02:00
commit 453d5ff21c
5 changed files with 13 additions and 8 deletions

View File

@ -13,7 +13,7 @@ include_directories (${BSON_INCLUDE_DIR})
include_directories (${INIPARSER_INCLUDE_DIR})
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
elseif(MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX /MP")

View File

@ -1,9 +1,11 @@
#include "reports.h"
#include "jsreport.h"
#include "kernel/region.h"
#include "kernel/terrain.h"
#include "kernel/terrainid.h"
#include "kernel/config.h"
#include <kernel/region.h>
#include <kernel/terrain.h>
#include <kernel/terrainid.h>
#include <kernel/config.h>
#include <util/log.h>
#include <limits.h>
#include <stdio.h>
@ -56,6 +58,9 @@ static int report_json(const char *filename, report_context * ctx, const char *c
sr = find_seen(ctx->seen, r);
if (sr) {
terrain_t ter = oldterrain(r->terrain);
if (ter != NOTERRAIN) {
log_warning("report_json: %s has no terrain id\n", r->terrain->_name);
}
data = 1 + (int)ter;
}
}

View File

@ -1199,7 +1199,7 @@ void setguard(unit * u, unsigned int flags)
}
fset(u, UFL_GUARD);
fset(u->region, RF_GUARDED);
if ((int)flags == guard_flags(u)) {
if (flags == guard_flags(u)) {
if (a)
a_remove(&u->attribs, a);
}

View File

@ -133,7 +133,7 @@ terrain_t oldterrain(const struct terrain_type * terrain)
if (newterrains[t] == terrain)
return t;
}
log_warning("%s is not a classic terrain.\n", terrain->_name);
log_debug("%s is not a classic terrain.\n", terrain->_name);
return NOTERRAIN;
}

View File

@ -20,8 +20,8 @@ extern "C" {
extern void log_flush(void);
/* use macros above instead of these: */
extern void log_warning(const char *format, ...);
extern void log_error(const char *format, ...);
extern void log_warning(const char *format, ...);
extern void log_debug(const char *format, ...);
extern void log_info(const char *format, ...);
extern void log_printf(FILE * ios, const char *format, ...);