* Fix some new GCC 4.3 warnings

* Fix many many strict aliasing warnings, now that it's re-enabled
This commit is contained in:
Tim Angus 2008-11-10 23:55:22 +00:00
parent 7c19978aaa
commit 72dea0a184
19 changed files with 220 additions and 152 deletions

View file

@ -239,7 +239,10 @@ Cmd_Exec_f
===============
*/
void Cmd_Exec_f( void ) {
char *f;
union {
char *c;
void *v;
} f;
int len;
char filename[MAX_QPATH];
@ -249,17 +252,17 @@ void Cmd_Exec_f( void ) {
}
Q_strncpyz( filename, Cmd_Argv(1), sizeof( filename ) );
COM_DefaultExtension( filename, sizeof( filename ), ".cfg" );
len = FS_ReadFile( filename, (void **)&f);
if (!f) {
COM_DefaultExtension( filename, sizeof( filename ), ".cfg" );
len = FS_ReadFile( filename, &f.v);
if (!f.c) {
Com_Printf ("couldn't exec %s\n",Cmd_Argv(1));
return;
}
Com_Printf ("execing %s\n",Cmd_Argv(1));
Cbuf_InsertText (f);
Cbuf_InsertText (f.c);
FS_FreeFile (f);
FS_FreeFile (f.v);
}