Cleanup: dead local variables

This commit is contained in:
Sebastien Alaiwan 2022-07-04 10:32:05 +02:00
parent 94a6d9ecd9
commit 0b97df3666
2 changed files with 2 additions and 6 deletions

View file

@ -181,10 +181,6 @@ static bool FindNearestReachableTerrainType(int movemask, int resmask, int range
order->CurrentResource = harvester.CurrentResource;
order->DoneHarvesting = true;
if (harvester.CurrentResource) {
const ResourceInfo &resinfo = *harvester.Type->ResInfo[harvester.CurrentResource];
}
if (depot == NULL) {
depot = FindDeposit(harvester, 1000, harvester.CurrentResource);
}

View file

@ -66,7 +66,7 @@ int main(int argc, char * argv[]) {
if ( file ) {
git_rev = (char*)calloc(sizeof(char), 1024);
if (fscanf(file, "ref: %s", git_rev) != 1 ) {
int ignored = fscanf(file, "%s", git_rev);
fscanf(file, "%s", git_rev);
}
fclose(file);
gitrevfile = (char*)calloc(sizeof(char), strlen(git_rev) + 6);
@ -75,7 +75,7 @@ int main(int argc, char * argv[]) {
free(gitrevfile);
if (file) {
git_rev = (char*)calloc(sizeof(char), 1024);
int ignored = fscanf(file, "%s", git_rev);
fscanf(file, "%s", git_rev);
fclose(file);
}
} else {