forked from github/server
jam rules for profiling, warnings fixed
This commit is contained in:
parent
9fef5c651f
commit
32659cddb6
|
@ -12,6 +12,12 @@ if ! $(CCACHE_DIR) {
|
|||
Echo Compiling with ccache ;
|
||||
}
|
||||
|
||||
if $(PROFILE) = 1 {
|
||||
Echo Compiling with profiler ;
|
||||
CCFLAGS += -pg ;
|
||||
LINKFLAGS += -pg ;
|
||||
}
|
||||
|
||||
CCFLAGS += -Wall ;
|
||||
|
||||
CCFLAGS += -Wwrite-strings
|
||||
|
|
|
@ -157,7 +157,7 @@ const troop no_troop = {0, 0};
|
|||
region *
|
||||
fleeregion(const unit * u)
|
||||
{
|
||||
const region *r = u->region;
|
||||
region *r = u->region;
|
||||
region *neighbours[MAXDIRECTIONS];
|
||||
int c = 0;
|
||||
direction_t i;
|
||||
|
|
|
@ -279,16 +279,17 @@ runhash(region * r)
|
|||
}
|
||||
|
||||
region *
|
||||
r_connect(const region * r, direction_t dir)
|
||||
r_connect(const region * r, direction_t dir)
|
||||
{
|
||||
static int set = 0;
|
||||
static region * buffer[MAXDIRECTIONS];
|
||||
static const region * last = NULL;
|
||||
|
||||
assert(dir<MAXDIRECTIONS);
|
||||
#ifdef FAST_CONNECT
|
||||
if (r->connect[dir]) return r->connect[dir];
|
||||
region * rmodify = (region*)r;
|
||||
if (r->connect[dir]) return r->connect[dir];
|
||||
#endif
|
||||
assert(dir<MAXDIRECTIONS);
|
||||
if (r != last) {
|
||||
set = 0;
|
||||
last = r;
|
||||
|
@ -298,7 +299,7 @@ r_connect(const region * r, direction_t dir)
|
|||
buffer[dir] = rfindhash(r->x + delta_x[dir], r->y + delta_y[dir]);
|
||||
set |= (1<<dir);
|
||||
#ifdef FAST_CONNECT
|
||||
r->connect[dir] = buffer[dir];
|
||||
rmodify->connect[dir] = buffer[dir];
|
||||
#endif
|
||||
return buffer[dir];
|
||||
}
|
||||
|
|
|
@ -889,20 +889,18 @@ readgame(const char * filename, int backup)
|
|||
#endif
|
||||
if(global.data_version >= SAVEXMLNAME_VERSION) {
|
||||
char basefile[1024];
|
||||
char *basearg;
|
||||
const char *basearg = "(null)";
|
||||
|
||||
rs(F, basefile);
|
||||
if(xmlfile != NULL) {
|
||||
if (xmlfile != NULL) {
|
||||
basearg = strrchr(xmlfile, '/');
|
||||
if(!basearg) {
|
||||
if (basearg==NULL) {
|
||||
basearg = xmlfile;
|
||||
} else {
|
||||
basearg++;
|
||||
++basearg;
|
||||
}
|
||||
} else {
|
||||
basearg = "(null)";
|
||||
}
|
||||
if(strcmp(basearg, basefile)) {
|
||||
if (strcmp(basearg, basefile)!=0) {
|
||||
printf("WARNING: xmlfile mismatch:\n");
|
||||
printf("WARNING: datafile contains %s\n", basefile);
|
||||
printf("WARNING: argument/default is %s\n", basearg);
|
||||
|
|
|
@ -14,7 +14,7 @@ SOURCES =
|
|||
gmcmd.c
|
||||
infocmd.c
|
||||
museum.c
|
||||
oceannames.c
|
||||
# oceannames.c
|
||||
score.c
|
||||
victoryconditions.c
|
||||
weather.c
|
||||
|
|
|
@ -38,7 +38,7 @@ namehash names[NMAXHASH];
|
|||
void nhash(const char * name);
|
||||
|
||||
typedef struct oceanname {
|
||||
struct name * next;
|
||||
struct oceanname * next;
|
||||
struct faction_list * factions;
|
||||
const char * name;
|
||||
} oceanname;
|
||||
|
|
Loading…
Reference in New Issue