* Fix some new GCC 4.3 warnings
* Fix many many strict aliasing warnings, now that it's re-enabled
This commit is contained in:
parent
7c19978aaa
commit
72dea0a184
19 changed files with 220 additions and 152 deletions
|
@ -86,12 +86,14 @@ send "\b \b"
|
|||
static void CON_Back( void )
|
||||
{
|
||||
char key;
|
||||
size_t size;
|
||||
|
||||
key = '\b';
|
||||
write(1, &key, 1);
|
||||
size = write(1, &key, 1);
|
||||
key = ' ';
|
||||
write(1, &key, 1);
|
||||
size = write(1, &key, 1);
|
||||
key = '\b';
|
||||
write(1, &key, 1);
|
||||
size = write(1, &key, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -142,12 +144,13 @@ static void CON_Show( void )
|
|||
ttycon_hide--;
|
||||
if (ttycon_hide == 0)
|
||||
{
|
||||
write( 1, "]", 1 );
|
||||
size_t size;
|
||||
size = write( 1, "]", 1 );
|
||||
if (TTY_con.cursor)
|
||||
{
|
||||
for (i=0; i<TTY_con.cursor; i++)
|
||||
{
|
||||
write(1, TTY_con.buffer+i, 1);
|
||||
size = write(1, TTY_con.buffer+i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -307,6 +310,7 @@ char *CON_Input( void )
|
|||
int avail;
|
||||
char key;
|
||||
field_t *history;
|
||||
size_t size;
|
||||
|
||||
if( ttycon_on )
|
||||
{
|
||||
|
@ -336,8 +340,8 @@ char *CON_Input( void )
|
|||
strcpy(text, TTY_con.buffer);
|
||||
Field_Clear(&TTY_con);
|
||||
key = '\n';
|
||||
write(1, &key, 1);
|
||||
write( 1, "]", 1 );
|
||||
size = write(1, &key, 1);
|
||||
size = write( 1, "]", 1 );
|
||||
return text;
|
||||
}
|
||||
if (key == '\t')
|
||||
|
@ -399,7 +403,7 @@ char *CON_Input( void )
|
|||
TTY_con.buffer[TTY_con.cursor] = key;
|
||||
TTY_con.cursor++;
|
||||
// print the current line (this is differential)
|
||||
write(1, &key, 1);
|
||||
size = write(1, &key, 1);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
@ -231,7 +231,10 @@ char *Sys_Cwd( void )
|
|||
{
|
||||
static char cwd[MAX_OSPATH];
|
||||
|
||||
getcwd( cwd, sizeof( cwd ) - 1 );
|
||||
char *result = getcwd( cwd, sizeof( cwd ) - 1 );
|
||||
if( result != cwd )
|
||||
return NULL;
|
||||
|
||||
cwd[MAX_OSPATH-1] = 0;
|
||||
|
||||
return cwd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue