Fix a few compiler warning when compiled with -Wextra.

This commit is contained in:
mmdolze
2012-02-29 23:20:37 +00:00
parent e486266628
commit 1579d452d9
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -223,7 +223,7 @@ glkclose(GLKDisplay *fd)
* *
* Send a character to the GLK * Send a character to the GLK
*/ */
int INLINE INLINE int
glkput(GLKDisplay *fd, int c) glkput(GLKDisplay *fd, int c)
{ {
unsigned char val; unsigned char val;
@@ -266,7 +266,7 @@ glkunget(GLKDisplay *fd, int c)
* *
* Read a character from the GLK * Read a character from the GLK
*/ */
int INLINE INLINE int
glkget(GLKDisplay *fd) glkget(GLKDisplay *fd)
{ {
unsigned char c; unsigned char c;
+4 -4
View File
@@ -77,7 +77,7 @@ static int read_tele(PrivateData *p, char *buffer);
static int real_send_tele(PrivateData *p, char *buffer, int len); static int real_send_tele(PrivateData *p, char *buffer, int len);
static int send_tele(PrivateData *p, char *buffer); static int send_tele(PrivateData *p, char *buffer);
static int send_ACK(PrivateData *p); static int send_ACK(PrivateData *p);
static unsigned long long timestamp(PrivateData *p); static unsigned long long timestamp(void);
static int initTTY(Driver *drvthis, int FD); static int initTTY(Driver *drvthis, int FD);
/* local functions for pylcd.c */ /* local functions for pylcd.c */
@@ -239,7 +239,7 @@ send_ACK(PrivateData *p)
* Returns the current time in microseconds since the Epoch. * Returns the current time in microseconds since the Epoch.
*/ */
static unsigned long long static unsigned long long
timestamp(PrivateData *p) timestamp(void)
{ {
struct timeval tv; struct timeval tv;
@@ -314,7 +314,7 @@ pyramid_init(Driver *drvthis)
memset(p->backingstore, ' ', SCREEN_SIZE); memset(p->backingstore, ' ', SCREEN_SIZE);
strcpy(p->last_key_pressed, NOKEY); strcpy(p->last_key_pressed, NOKEY);
p->last_key_time = timestamp(p); p->last_key_time = timestamp();
p->timeout.tv_sec = 0; p->timeout.tv_sec = 0;
p->timeout.tv_usec = MICROTIMEOUT; p->timeout.tv_usec = MICROTIMEOUT;
@@ -1074,7 +1074,7 @@ pyramid_get_key(Driver *drvthis)
if (p->last_key_pressed[0] == NOKEY[0]) if (p->last_key_pressed[0] == NOKEY[0])
return NULL; return NULL;
current_time = timestamp(p); current_time = timestamp();
if (current_time > p->last_key_time + 500000) /* New keys only every if (current_time > p->last_key_time + 500000) /* New keys only every
* 0.5 seconds */ * 0.5 seconds */
p->last_key_time = current_time; p->last_key_time = current_time;
+1 -1
View File
@@ -145,7 +145,7 @@ t6963_low_command_word(T6963_port *p, u8 cmd, u16 word)
* \param sta Bitmap of expected STA flags * \param sta Bitmap of expected STA flags
* \return 0 on success, -1 if ready could not be read * \return 0 on success, -1 if ready could not be read
*/ */
inline int int
t6963_low_dsp_ready(T6963_port *p, u8 sta) t6963_low_dsp_ready(T6963_port *p, u8 sta)
{ {
int portcontrol = 0; int portcontrol = 0;
+1 -1
View File
@@ -106,7 +106,7 @@ void t6963_low_auto_write(T6963_port *p, u8 byte);
void t6963_low_command(T6963_port *p, u8 byte); void t6963_low_command(T6963_port *p, u8 byte);
void t6963_low_command_byte(T6963_port *p, u8 cmd, u8 byte); void t6963_low_command_byte(T6963_port *p, u8 cmd, u8 byte);
void t6963_low_command_word(T6963_port *p, u8 cmd, u16 word); void t6963_low_command_word(T6963_port *p, u8 cmd, u16 word);
inline int t6963_low_dsp_ready(T6963_port *p, u8 sta); int t6963_low_dsp_ready(T6963_port *p, u8 sta);
inline void t6963_low_send(T6963_port *p, u8 type, u8 byte); inline void t6963_low_send(T6963_port *p, u8 type, u8 byte);
#endif #endif