diff --git a/configure.ac b/configure.ac index 25760bca8..94adaf3c3 100644 --- a/configure.ac +++ b/configure.ac @@ -227,8 +227,8 @@ WZ_CFLAGS="${WZ_CFLAGS} -DLOCALEDIR=\"\\\"\${localedir}\\\"\"" # add some required C flags here -# -DYY_STATIC is required by flex -WZ_CFLAGS="${WZ_CFLAGS} -DYY_STATIC" +# YY_NO_INPUT to prevent Flex from defining input(): We use our own YY_INPUT instead. +WZ_CFLAGS="${WZ_CFLAGS} -DYY_NO_INPUT" CPPFLAGS="${CPPFLAGS} -I\$(top_srcdir)" diff --git a/lib/script/script_parser.y b/lib/script/script_parser.y index 5efd314bf..f67074725 100644 --- a/lib/script/script_parser.y +++ b/lib/script/script_parser.y @@ -1721,6 +1721,7 @@ static CODE_ERROR scriptCodeEvent(EVENT_SYMBOL *psEvent, TRIGGER_SYMBOL *psTrig, } #endif +#ifdef UNUSED /* Store the types of a list of variables into a code block. * The order of the list is reversed so that the type of the * first variable defined is stored first. @@ -1736,6 +1737,7 @@ static void scriptStoreVarTypes(VAR_SYMBOL *psVar) PUT_INDEX(ip, psVar->type); } } +#endif /* Change the error action for the ALLOC macro's to what it * should be inside a rule body. diff --git a/src/game.c b/src/game.c index 7b276a07a..d8ea72cef 100644 --- a/src/game.c +++ b/src/game.c @@ -6339,19 +6339,16 @@ BOOL loadSaveDroidV19(char *pFileData, UDWORD filesize, UDWORD numDroids, UDWORD /* code for all versions after save name change v19*/ BOOL loadSaveDroidV(char *pFileData, UDWORD filesize, UDWORD numDroids, UDWORD version, DROID **ppsCurrentDroidLists) { - SAVE_DROID *psSaveDroid, sSaveDroid; + SAVE_DROID sSaveDroid, *psSaveDroid = &sSaveDroid; // DROID_TEMPLATE *psTemplate, sTemplate; DROID *psDroid; - DROID_GROUP *psCurrentTransGroup; + DROID_GROUP *psCurrentTransGroup = NULL; UDWORD count; UDWORD NumberOfSkippedDroids=0; UDWORD sizeOfSaveDroid = 0; // DROID_GROUP *psGrp; UBYTE i; - psCurrentTransGroup = NULL; - - psSaveDroid = &sSaveDroid; if (version <= VERSION_20) { sizeOfSaveDroid = sizeof(SAVE_DROID_V20);