Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apply Debian patch to keep GCC5 happy
  • Loading branch information
cim-- committed Sep 6, 2015
1 parent 622b05a commit a439f3d
Show file tree
Hide file tree
Showing 33 changed files with 136 additions and 136 deletions.
2 changes: 1 addition & 1 deletion src/Core/Entities/Entity.m
Expand Up @@ -517,7 +517,7 @@ - (void) wasRemovedFromUniverse
- (void) warnAboutHostiles
{
// do nothing for now, this can be expanded in sub classes
OOLog(@"general.error.subclassResponsibility.Entity-warnAboutHostiles", @"***** Entity does nothing in warnAboutHostiles");
OOLog(@"general.error.subclassResponsibility.Entity-warnAboutHostiles", @"%@", @"***** Entity does nothing in warnAboutHostiles");
}


Expand Down
26 changes: 13 additions & 13 deletions src/Core/Entities/PlayerEntity.m
Expand Up @@ -203,7 +203,7 @@ - (GLfloat) baseMass
else
{
// This happened on startup when [UNIVERSE setUpSpace] was called before player init, inside [UNIVERSE setUpInitialUniverse].
OOLog(@"fuelPrices", @"Player ship not initialised properly yet, using precalculated base mass.");
OOLog(@"fuelPrices", @"%@", @"Player ship not initialised properly yet, using precalculated base mass.");
return 185580.0;
}
}
Expand Down Expand Up @@ -324,7 +324,7 @@ - (void) createCargoPodWithType:(OOCommodityType)type andAmount:(OOCargoQuantity
}
else
{
OOLogERR(@"player.loadCargoPods.noContainer", @"couldn't create a container in [PlayerEntity loadCargoPods]");
OOLogERR(@"player.loadCargoPods.noContainer", @"%@", @"couldn't create a container in [PlayerEntity loadCargoPods]");
// throw an exception here...
[NSException raise:OOLITE_EXCEPTION_FATAL
format:@"[PlayerEntity loadCargoPods] failed to create a container for cargo with role 'cargopod'"];
Expand Down Expand Up @@ -1489,12 +1489,12 @@ energy bomb (900 credits). This must be done after missiles are
*/
if ([self mountMissileWithRole:@"EQ_QC_MINE"])
{
OOLog(@"load.upgrade.replacedEnergyBomb", @"Replaced legacy energy bomb with Quirium cascade mine.");
OOLog(@"load.upgrade.replacedEnergyBomb", @"%@", @"Replaced legacy energy bomb with Quirium cascade mine.");
}
else
{
credits += 9000;
OOLog(@"load.upgrade.replacedEnergyBomb", @"Compensated legacy energy bomb with 900 credits.");
OOLog(@"load.upgrade.replacedEnergyBomb", @"%@", @"Compensated legacy energy bomb with 900 credits.");
}
}

Expand Down Expand Up @@ -1663,7 +1663,7 @@ - (BOOL) setUpAndConfirmOK:(BOOL)stopOnError saveGame:(BOOL)saveGame
// set up STATUS_DEAD
[self setDockedStation:nil]; // needed for STATUS_DEAD
[self setStatus:STATUS_DEAD];
OOLog(@"script.javascript.init.error", @"Scheduling new JavaScript reset.");
OOLog(@"script.javascript.init.error", @"%@", @"Scheduling new JavaScript reset.");
shot_time = kDeadResetTime - 0.02f; // schedule reinit 20 milliseconds from now.

if (![gc inFullScreenMode]) [gc startAnimationTimer]; // keep the game ticking over.
Expand Down Expand Up @@ -3786,7 +3786,7 @@ - (void) updateTargeting
switch ([wh scanInfo])
{
case WH_SCANINFO_NONE:
OOLog(kOOLogInconsistentState, @"Internal Error - WH_SCANINFO_NONE reached in [PlayerEntity updateTargeting:]");
OOLog(kOOLogInconsistentState, @"%@", @"Internal Error - WH_SCANINFO_NONE reached in [PlayerEntity updateTargeting:]");
[self dumpState];
[wh dumpState];
// Workaround a reported hit of the assert here. We really
Expand Down Expand Up @@ -4512,7 +4512,7 @@ - (OOMissileStatus) dialMissileStatus
// Invariant/safety interlock: weapons offline implies missiles safe. -- Ahruman 2012-07-21
if (missile_status != MISSILE_STATUS_SAFE)
{
OOLogERR(@"player.missilesUnsafe", @"Missile state is not SAFE when weapons are offline. This is a bug, please report it.");
OOLogERR(@"player.missilesUnsafe", @"%@", @"Missile state is not SAFE when weapons are offline. This is a bug, please report it.");
[self safeAllMissiles];
}
return MISSILE_STATUS_SAFE;
Expand Down Expand Up @@ -6833,7 +6833,7 @@ - (void) witchStart

if ( ![self wormhole] && !galactic_witchjump) // galactic hyperspace does not generate a wormhole
{
OOLog(kOOLogInconsistentState, @"Internal Error : Player entering witchspace with no wormhole.");
OOLog(kOOLogInconsistentState, @"%@", @"Internal Error : Player entering witchspace with no wormhole.");
}
[UNIVERSE allShipsDoScriptEvent:OOJSID("playerWillEnterWitchspace") andReactToAIMessage:@"PLAYER WITCHSPACE"];

Expand Down Expand Up @@ -8232,7 +8232,7 @@ - (void) setGuiToGameOptionsScreen
NSUInteger displayModeIndex = [controller indexOfCurrentDisplayMode];
if (displayModeIndex == NSNotFound)
{
OOLogWARN(@"display.currentMode.notFound", @"couldn't find current fullscreen setting, switching to default.");
OOLogWARN(@"display.currentMode.notFound", @"%@", @"couldn't find current fullscreen setting, switching to default.");
displayModeIndex = 0;
}

Expand Down Expand Up @@ -9793,7 +9793,7 @@ - (BOOL) tryBuyingItem:(NSString *)eqKey

if ([eqType isMissileOrMine] && missiles >= max_missiles)
{
OOLog(@"equip.buy.mounted.failed.full", @"rejecting missile because already full");
OOLog(@"equip.buy.mounted.failed.full", @"%@", @"rejecting missile because already full");
return NO;
}

Expand Down Expand Up @@ -11383,7 +11383,7 @@ - (void) setTrumbleValueFrom:(NSObject*) trumbleValue

if (info_failed)
{
OOLog(@"cheat.tentative", @"POSSIBLE CHEAT DETECTED");
OOLog(@"cheat.tentative", @"%@", @"POSSIBLE CHEAT DETECTED");
possible_cheat = YES;
}

Expand All @@ -11403,7 +11403,7 @@ - (void) setTrumbleValueFrom:(NSObject*) trumbleValue
}

if (possible_cheat && !info_failed)
OOLog(@"cheat.verified", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
OOLog(@"cheat.verified", @"%@", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
}

if (info_failed && [[NSUserDefaults standardUserDefaults] objectForKey:namekey])
Expand All @@ -11425,7 +11425,7 @@ - (void) setTrumbleValueFrom:(NSObject*) trumbleValue
}

if (!info_failed)
OOLog(@"cheat.verified", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
OOLog(@"cheat.verified", @"%@", @"CHEAT DEFEATED - that's not the way to get rid of trumbles!");
}
// at this stage we've done the best we can to stop cheaters
trumbleCount = putativeNTrumbles;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Entities/PlayerEntityControls.m
Expand Up @@ -2151,7 +2151,7 @@ - (void) pollGuiArrowKeyControls:(double) delta_t
OOLog(kOOLogException, @"\n\n***** Handling exception: %@ : %@ *****\n\n",[exception name], [exception reason]);
if ([[exception name] isEqual:@"GameNotSavedException"]) // try saving game instead
{
OOLog(kOOLogException, @"\n\n***** Trying a normal save instead *****\n\n");
OOLog(kOOLogException, @"%@", @"\n\n***** Trying a normal save instead *****\n\n");
if ([controller inFullScreenMode])
[controller pauseFullScreenModeToPerform:@selector(savePlayer) onTarget:self];
else
Expand Down Expand Up @@ -2889,7 +2889,7 @@ - (void) handleGameOptionsScreenKeys

if (displayModeIndex == (NSInteger)NSNotFound)
{
OOLogWARN(@"graphics.mode.notFound", @"couldn't find current fullscreen setting, switching to default.");
OOLogWARN(@"graphics.mode.notFound", @"%@", @"couldn't find current fullscreen setting, switching to default.");
displayModeIndex = 0;
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Entities/ShipEntity.m
Expand Up @@ -13220,7 +13220,7 @@ - (BOOL) abandonShip
BOOL OK = NO;
if ([self isPlayer] && [(PlayerEntity *)self isDocked])
{
OOLog(@"ShipEntity.abandonShip.failed", @"Player cannot abandon ship while docked.");
OOLog(@"ShipEntity.abandonShip.failed", @"%@", @"Player cannot abandon ship while docked.");
return OK;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Entities/ShipEntityAI.m
Expand Up @@ -1337,7 +1337,7 @@ - (void) setTakeOffFromPlanet
}
else
{
OOLog(@"ai.setTakeOffFromPlanet.noPlanet", @"***** Error. Planet not found during take off!");
OOLog(@"ai.setTakeOffFromPlanet.noPlanet", @"%@", @"***** Error. Planet not found during take off!");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Entities/SkyEntity.m
Expand Up @@ -195,7 +195,7 @@ - (void) update:(OOTimeDelta) delta_t
}
else
{
OOLog(@"sky.warning",@"PLAYER is nil");
OOLog(@"sky.warning", @"%@", @"PLAYER is nil");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Entities/WormholeEntity.m
Expand Up @@ -623,7 +623,7 @@ - (NSString *) identFromShip:(ShipEntity*)ship
}
else
{
OOLogERR(kOOLogInconsistentState, @"Wormhole identified when ship has no EQ_WORMHOLE_SCANNER.");
OOLogERR(kOOLogInconsistentState, @"%@", @"Wormhole identified when ship has no EQ_WORMHOLE_SCANNER.");
/*
This was previously an assertion, but a player reported hitting it.
http://aegidian.org/bb/viewtopic.php?p=128110#p128110
Expand Down
2 changes: 1 addition & 1 deletion src/Core/GameController.m
Expand Up @@ -835,7 +835,7 @@ - (void) exitAppWithContext:(NSString *)context
[[OODebugMonitor sharedDebugMonitor] applicationWillTerminate];
#endif
[[NSUserDefaults standardUserDefaults] synchronize];
OOLog(@"gameController.exitApp",@".GNUstepDefaults synchronized.");
OOLog(@"gameController.exitApp", @"%@", @".GNUstepDefaults synchronized.");
OOLoggingTerminate();
SDL_Quit();
[[OOOpenALController sharedController] shutdown];
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Materials/OOMaterial.m
Expand Up @@ -152,7 +152,7 @@ - (void)willDealloc
{
if (EXPECT_NOT(sActiveMaterial == self))
{
OOLog(@"shader.dealloc.imbalance", @"***** Material deallocated while active, indicating a retain/release imbalance.");
OOLog(@"shader.dealloc.imbalance", @"%@", @"***** Material deallocated while active, indicating a retain/release imbalance.");
[self unapplyWithNext:nil];
sActiveMaterial = nil;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Core/Materials/OOPlanetTextureGenerator.m
Expand Up @@ -148,12 +148,12 @@ @implementation OOPlanetTextureGenerator

- (id) initWithPlanetInfo:(NSDictionary *)planetInfo
{
OOLog(@"texture.planet.generate",@"Initialising planetary generator");
OOLog(@"texture.planet.generate", @"%@", @"Initialising planetary generator");

// AllowCubeMap not used yet but might be in future
if ((self = [super initWithPath:[NSString stringWithFormat:@"OOPlanetTexture@%p", self] options:kOOTextureAllowCubeMap]))
{
OOLog(@"texture.planet.generate",@"Extracting parameters for generator %@",self);
OOLog(@"texture.planet.generate", @"Extracting parameters for generator %@",self);

_info.landFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"land_fraction" defaultValue:0.3]);
_info.polarFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"polar_fraction" defaultValue:0.05]);
Expand All @@ -164,7 +164,7 @@ - (id) initWithPlanetInfo:(NSDictionary *)planetInfo
[[planetInfo objectForKey:@"noise_map_seed"] getValue:&_info.seed];
if ([planetInfo objectForKey:@"cloud_alpha"])
{
OOLog(@"texture.planet.generate",@"Extracting atmosphere parameters");
OOLog(@"texture.planet.generate", @"%@", @"Extracting atmosphere parameters");
// we have an atmosphere:
_info.cloudAlpha = [planetInfo oo_floatForKey:@"cloud_alpha" defaultValue:1.0f];
_info.cloudFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"cloud_fraction" defaultValue:0.3]);
Expand Down Expand Up @@ -1324,7 +1324,7 @@ - (BOOL) getResult:(OOPixMap *)result

- (void) completeWithData:(void *)data_ width:(unsigned)width_ height:(unsigned)height_
{
OOLog(@"texture.planet.generate",@"Completing atmosphere generator");
OOLog(@"texture.planet.generate", @"%@", @"Completing atmosphere generator");

_data = data_;
_width = width_;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Materials/OOStandaloneAtmosphereGenerator.m
Expand Up @@ -101,14 +101,14 @@ @implementation OOStandaloneAtmosphereGenerator

- (id) initWithPlanetInfo:(NSDictionary *)planetInfo
{
OOLog(@"texture.planet.generate",@"Initialising standalone atmosphere generator");
OOLog(@"texture.planet.generate", @"%@", @"Initialising standalone atmosphere generator");

// AllowCubeMap not used yet but might be in future
if ((self = [super initWithPath:[NSString stringWithFormat:@"OOStandaloneAtmosphereTexture@%p", self] options:kOOTextureAllowCubeMap]))
{
OOLog(@"texture.planet.generate",@"Extracting parameters for generator %@",self);
[[planetInfo objectForKey:@"noise_map_seed"] getValue:&_info.seed];
OOLog(@"texture.planet.generate",@"Extracting atmosphere parameters");
OOLog(@"texture.planet.generate", @"%@", @"Extracting atmosphere parameters");
// we are an atmosphere:
_info.cloudAlpha = [planetInfo oo_floatForKey:@"cloud_alpha" defaultValue:1.0f];
_info.cloudFraction = OOClamp_0_1_f([planetInfo oo_floatForKey:@"cloud_fraction" defaultValue:0.3]);
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Materials/OOTextureLoader.m
Expand Up @@ -329,7 +329,7 @@ - (void)performAsyncTask

if (_data != NULL) [self applySettings];

OOLog(@"texture.load.asyncLoad.done", @"Loading complete.");
OOLog(@"texture.load.asyncLoad.done", @"%@", @"Loading complete.");
}
@catch (NSException *exception)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/OOALBufferedSound.m
Expand Up @@ -84,7 +84,7 @@ - (ALuint) soundBuffer
OOAL(alGenBuffers(1,&buffer));
if ((error = alGetError()) != AL_NO_ERROR)
{
OOLog(kOOLogSoundLoadingError,@"Could not create OpenAL buffer");
OOLog(kOOLogSoundLoadingError, @"%@", @"Could not create OpenAL buffer");
return 0;
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/Core/OOALSoundChannel.m
Expand Up @@ -49,7 +49,7 @@ - (id) init
OOAL(alGenSources(1,&_source));
if ((error = alGetError()) != AL_NO_ERROR)
{
OOLog(kOOLogSoundInitError, @"Could not create OpenAL source");
OOLog(kOOLogSoundInitError, @"%@", @"Could not create OpenAL source");
[self release];
self = nil;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/OOALStreamedSound.m
Expand Up @@ -107,7 +107,7 @@ - (ALuint) soundBuffer
OOAL(alGenBuffers(1,&buffer));
if ((error = alGetError()) != AL_NO_ERROR)
{
OOLog(kOOLogSoundLoadingError,@"Could not create OpenAL buffer");
OOLog(kOOLogSoundLoadingError, @"%@", @"Could not create OpenAL buffer");
return 0;
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/Core/OOAsyncWorkManager.m
Expand Up @@ -121,7 +121,7 @@ static void InitAsyncWorkManager(void)

if (sSingleton == nil)
{
OOLog(@"asyncWorkManager.setUpDispatcher.failed", @"***** FATAL ERROR: could not set up async work manager!");
OOLog(@"asyncWorkManager.setUpDispatcher.failed", @"%@", @"***** FATAL ERROR: could not set up async work manager!");
exit(EXIT_FAILURE);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Core/OOCPUInfo.m
Expand Up @@ -67,15 +67,15 @@ void OOCPUInfoInit(void)
#if OOLITE_BIG_ENDIAN
if (*(uint32_t*)endianTag != 0x12345678)
{
OOLog(@"cpuInfo.endianTest.failed", @"OOLITE_BIG_ENDIAN is set, but the system is not big-endian -- aborting.");
OOLog(@"cpuInfo.endianTest.failed", @"%@", @"OOLITE_BIG_ENDIAN is set, but the system is not big-endian -- aborting.");
exit(EXIT_FAILURE);
}
#endif

#if OOLITE_LITTLE_ENDIAN
if (*(uint32_t*)endianTag != 0x78563412)
{
OOLog(@"cpuInfo.endianTest.failed", @"OOLITE_LITTLE_ENDIAN is set, but the system is not little-endian -- aborting.");
OOLog(@"cpuInfo.endianTest.failed", @"%@", @"OOLITE_LITTLE_ENDIAN is set, but the system is not little-endian -- aborting.");
exit(EXIT_FAILURE);
}
#endif
Expand Down
22 changes: 11 additions & 11 deletions src/Core/OOCacheManager.m
Expand Up @@ -344,7 +344,7 @@ - (void)loadCache
if (cache != nil)
{
// We have a cache
OOLog(kOOLogDataCacheFound, @"Found data cache.");
OOLog(kOOLogDataCacheFound, @"%@", @"Found data cache.");
OOLogIndentIf(kOOLogDataCacheFound);

cacheVersion = [cache objectForKey:kCacheKeyVersion];
Expand All @@ -366,15 +366,15 @@ - (void)loadCache
endianTag = [cache objectForKey:kCacheKeyEndianTag];
if (![endianTag isKindOfClass:[NSData class]] || [endianTag length] != sizeof endianTagValue)
{
OOLog(kOOLogDataCacheRebuild, @"Data cache endian tag is invalid, rebuilding cache.");
OOLog(kOOLogDataCacheRebuild, @"%@", @"Data cache endian tag is invalid, rebuilding cache.");
accept = NO;
}
else
{
endianTagValue = *(const uint64_t *)[endianTag bytes];
if (endianTagValue != kEndianTagValue)
{
OOLog(kOOLogDataCacheRebuild, @"Data cache endianness is inappropriate for this system, rebuilding cache.");
OOLog(kOOLogDataCacheRebuild, @"%@", @"Data cache endianness is inappropriate for this system, rebuilding cache.");
accept = NO;
}
}
Expand All @@ -391,7 +391,7 @@ - (void)loadCache
else
{
// No cache
OOLog(kOOLogDataCacheNotFound, @"No data cache found, starting from scratch.");
OOLog(kOOLogDataCacheNotFound, @"%@", @"No data cache found, starting from scratch.");
}

// If loading failed, or there was a version or endianness conflict
Expand All @@ -417,9 +417,9 @@ - (void)write
#endif

#if WRITE_ASYNC
OOLog(@"dataCache.willWrite", @"Scheduling data cache write.");
OOLog(@"dataCache.willWrite", @"%@", @"Scheduling data cache write.");
#else
OOLog(@"dataCache.willWrite", @"About to write cache.");
OOLog(@"dataCache.willWrite", @"%@", @"About to write cache.");
#endif

ooliteVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
Expand All @@ -429,7 +429,7 @@ - (void)write
pListRep = [self dictionaryOfCaches];
if (ooliteVersion == nil || endianTag == nil || formatVersion == nil || pListRep == nil)
{
OOLog(@"dataCache.cantWrite", @"Failed to write data cache -- prerequisites not fulfilled. %@",@"This is an internal error, please report it.");
OOLog(@"dataCache.cantWrite", @"%@", @"Failed to write data cache -- prerequisites not fulfilled. This is an internal error, please report it.");
return;
}

Expand Down Expand Up @@ -461,11 +461,11 @@ - (void)write
if ([self writeDict:newCache])
{
[self markClean];
OOLog(kOOLogDataCacheWriteSuccess, @"Wrote data cache.");
OOLog(kOOLogDataCacheWriteSuccess, @"%@", @"Wrote data cache.");
}
else
{
OOLog(kOOLogDataCacheWriteFailed, @"Failed to write data cache.");
OOLog(kOOLogDataCacheWriteFailed, @"%@", @"Failed to write data cache.");
}
#endif
}
Expand Down Expand Up @@ -733,11 +733,11 @@ - (void) performAsyncTask
{
if ([[OOCacheManager sharedCache] writeDict:_cacheContents])
{
OOLog(kOOLogDataCacheWriteSuccess, @"Wrote data cache.");
OOLog(kOOLogDataCacheWriteSuccess, @"%@", @"Wrote data cache.");
}
else
{
OOLog(kOOLogDataCacheWriteFailed, @"Failed to write data cache.");
OOLog(kOOLogDataCacheWriteFailed, @"%@", @"Failed to write data cache.");
}
DESTROY(_cacheContents);
}
Expand Down

0 comments on commit a439f3d

Please sign in to comment.