mirror of
https://github.com/TTimo/doom3.gpl.git
synced 2026-03-19 16:39:24 +01:00
Merge pull request #28 from xoddark/Werror_write-strings
Fix write-strings warning
This commit is contained in:
@@ -71,7 +71,7 @@ const char *idGameLocal::sufaceTypeNames[ MAX_SURFACE_TYPES ] = {
|
|||||||
|
|
||||||
#ifdef _D3XP
|
#ifdef _D3XP
|
||||||
// List of all defs used by the player that will stay on the fast timeline
|
// List of all defs used by the player that will stay on the fast timeline
|
||||||
static char* fastEntityList[] = {
|
static const char* fastEntityList[] = {
|
||||||
"player_doommarine",
|
"player_doommarine",
|
||||||
"weapon_chainsaw",
|
"weapon_chainsaw",
|
||||||
"weapon_fists",
|
"weapon_fists",
|
||||||
|
|||||||
@@ -772,7 +772,7 @@ void idItemTeam::Spawn( void ) {
|
|||||||
idItemTeam::LoadScript
|
idItemTeam::LoadScript
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
function_t * idItemTeam::LoadScript( char * script ) {
|
function_t * idItemTeam::LoadScript( const char * script ) {
|
||||||
function_t * function = NULL;
|
function_t * function = NULL;
|
||||||
idStr funcname = spawnArgs.GetString( script, "" );
|
idStr funcname = spawnArgs.GetString( script, "" );
|
||||||
if ( funcname.Length() ) {
|
if ( funcname.Length() ) {
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ private:
|
|||||||
void Event_FlagCapture( void );
|
void Event_FlagCapture( void );
|
||||||
|
|
||||||
void PrivateReturn( void );
|
void PrivateReturn( void );
|
||||||
function_t * LoadScript( char * script );
|
function_t * LoadScript( const char * script );
|
||||||
|
|
||||||
void SpawnNugget( idVec3 pos );
|
void SpawnNugget( idVec3 pos );
|
||||||
void UpdateGuis( void );
|
void UpdateGuis( void );
|
||||||
|
|||||||
@@ -4230,7 +4230,7 @@ idMultiplayerGame::GetTeamFlag
|
|||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void idMultiplayerGame::FindTeamFlags( void ) {
|
void idMultiplayerGame::FindTeamFlags( void ) {
|
||||||
char * flagDefs[2] =
|
const char * flagDefs[2] =
|
||||||
{
|
{
|
||||||
"team_CTF_redflag",
|
"team_CTF_redflag",
|
||||||
"team_CTF_blueflag"
|
"team_CTF_blueflag"
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ argv(0) god
|
|||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void Cmd_God_f( const idCmdArgs &args ) {
|
void Cmd_God_f( const idCmdArgs &args ) {
|
||||||
char *msg;
|
const char *msg;
|
||||||
idPlayer *player;
|
idPlayer *player;
|
||||||
|
|
||||||
player = gameLocal.GetLocalPlayer();
|
player = gameLocal.GetLocalPlayer();
|
||||||
@@ -475,7 +475,7 @@ argv(0) notarget
|
|||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void Cmd_Notarget_f( const idCmdArgs &args ) {
|
void Cmd_Notarget_f( const idCmdArgs &args ) {
|
||||||
char *msg;
|
const char *msg;
|
||||||
idPlayer *player;
|
idPlayer *player;
|
||||||
|
|
||||||
player = gameLocal.GetLocalPlayer();
|
player = gameLocal.GetLocalPlayer();
|
||||||
@@ -502,7 +502,7 @@ argv(0) noclip
|
|||||||
==================
|
==================
|
||||||
*/
|
*/
|
||||||
void Cmd_Noclip_f( const idCmdArgs &args ) {
|
void Cmd_Noclip_f( const idCmdArgs &args ) {
|
||||||
char *msg;
|
const char *msg;
|
||||||
idPlayer *player;
|
idPlayer *player;
|
||||||
|
|
||||||
player = gameLocal.GetLocalPlayer();
|
player = gameLocal.GetLocalPlayer();
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||||||
#define TOP_PRIORITY 7
|
#define TOP_PRIORITY 7
|
||||||
|
|
||||||
bool idCompiler::punctuationValid[ 256 ];
|
bool idCompiler::punctuationValid[ 256 ];
|
||||||
char *idCompiler::punctuation[] = {
|
const char *idCompiler::punctuation[] = {
|
||||||
"+=", "-=", "*=", "/=", "%=", "&=", "|=", "++", "--",
|
"+=", "-=", "*=", "/=", "%=", "&=", "|=", "++", "--",
|
||||||
"&&", "||", "<=", ">=", "==", "!=", "::", ";", ",",
|
"&&", "||", "<=", ">=", "==", "!=", "::", ";", ",",
|
||||||
"~", "!", "*", "/", "%", "(", ")", "-", "+",
|
"~", "!", "*", "/", "%", "(", ")", "-", "+",
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ If you have questions concerning this license or the applicable additional terms
|
|||||||
const char * const RESULT_STRING = "<RESULT>";
|
const char * const RESULT_STRING = "<RESULT>";
|
||||||
|
|
||||||
typedef struct opcode_s {
|
typedef struct opcode_s {
|
||||||
char *name;
|
const char *name;
|
||||||
char *opname;
|
const char *opname;
|
||||||
int priority;
|
int priority;
|
||||||
bool rightAssociative;
|
bool rightAssociative;
|
||||||
idVarDef *type_a;
|
idVarDef *type_a;
|
||||||
@@ -197,7 +197,7 @@ enum {
|
|||||||
class idCompiler {
|
class idCompiler {
|
||||||
private:
|
private:
|
||||||
static bool punctuationValid[ 256 ];
|
static bool punctuationValid[ 256 ];
|
||||||
static char *punctuation[];
|
static const char *punctuation[];
|
||||||
|
|
||||||
idParser parser;
|
idParser parser;
|
||||||
idParser *parserPtr;
|
idParser *parserPtr;
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ idInterpreter::Error
|
|||||||
Aborts the currently executing function
|
Aborts the currently executing function
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void idInterpreter::Error( char *fmt, ... ) const {
|
void idInterpreter::Error( const char *fmt, ... ) const {
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char text[ 1024 ];
|
char text[ 1024 ];
|
||||||
|
|
||||||
@@ -450,7 +450,7 @@ idInterpreter::Warning
|
|||||||
Prints file and line number information with warning.
|
Prints file and line number information with warning.
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void idInterpreter::Warning( char *fmt, ... ) const {
|
void idInterpreter::Warning( const char *fmt, ... ) const {
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char text[ 1024 ];
|
char text[ 1024 ];
|
||||||
|
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ public:
|
|||||||
int CurrentLine( void ) const;
|
int CurrentLine( void ) const;
|
||||||
const char *CurrentFile( void ) const;
|
const char *CurrentFile( void ) const;
|
||||||
|
|
||||||
void Error( char *fmt, ... ) const id_attribute((format(printf,2,3)));
|
void Error( const char *fmt, ... ) const id_attribute((format(printf,2,3)));
|
||||||
void Warning( char *fmt, ... ) const id_attribute((format(printf,2,3)));
|
void Warning( const char *fmt, ... ) const id_attribute((format(printf,2,3)));
|
||||||
void DisplayInfo( void ) const;
|
void DisplayInfo( void ) const;
|
||||||
|
|
||||||
bool BeginMultiFrameEvent( idEntity *ent, const idEventDef *event );
|
bool BeginMultiFrameEvent( idEntity *ent, const idEventDef *event );
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ typedef enum {
|
|||||||
// punctuation
|
// punctuation
|
||||||
typedef struct punctuation_s
|
typedef struct punctuation_s
|
||||||
{
|
{
|
||||||
char *p; // punctuation character(s)
|
const char *p; // punctuation character(s)
|
||||||
int n; // punctuation id
|
int n; // punctuation id
|
||||||
} punctuation_t;
|
} punctuation_t;
|
||||||
|
|
||||||
|
|||||||
@@ -625,7 +625,7 @@ void idParser::AddBuiltinDefines( void ) {
|
|||||||
define_t *define;
|
define_t *define;
|
||||||
struct builtin
|
struct builtin
|
||||||
{
|
{
|
||||||
char *string;
|
const char *string;
|
||||||
int id;
|
int id;
|
||||||
} builtin[] = {
|
} builtin[] = {
|
||||||
{ "__LINE__", BUILTIN_LINE },
|
{ "__LINE__", BUILTIN_LINE },
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ TIME_TYPE time_in_millisec( void ) {
|
|||||||
PrintClocks
|
PrintClocks
|
||||||
============
|
============
|
||||||
*/
|
*/
|
||||||
void PrintClocks( char *string, int dataCount, int clocks, int otherClocks = 0 ) {
|
void PrintClocks( const char *string, int dataCount, int clocks, int otherClocks = 0 ) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
idLib::common->Printf( string );
|
idLib::common->Printf( string );
|
||||||
|
|||||||
Reference in New Issue
Block a user