mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-07 07:38:04 -04:00
deal with some gcc7+ warnings
This commit is contained in:
parent
f8cd6a082b
commit
795b71c571
2 changed files with 17 additions and 10 deletions
|
@ -192,7 +192,10 @@ void sndout_oss_setvol(int l, int r)
|
||||||
|
|
||||||
void sndout_oss_exit(void)
|
void sndout_oss_exit(void)
|
||||||
{
|
{
|
||||||
if (sounddev >= 0) close(sounddev); sounddev = -1;
|
if (sounddev >= 0)
|
||||||
if (mixerdev >= 0) close(mixerdev); mixerdev = -1;
|
close(sounddev);
|
||||||
|
if (mixerdev >= 0)
|
||||||
|
close(mixerdev);
|
||||||
|
sounddev = mixerdev = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
20
menu.c
20
menu.c
|
@ -24,6 +24,10 @@
|
||||||
#include "plat.h"
|
#include "plat.h"
|
||||||
#include "posix.h"
|
#include "posix.h"
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 7
|
||||||
|
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
||||||
|
#endif
|
||||||
|
|
||||||
static char static_buff[64];
|
static char static_buff[64];
|
||||||
static int menu_error_time = 0;
|
static int menu_error_time = 0;
|
||||||
char menu_error_msg[64] = { 0, };
|
char menu_error_msg[64] = { 0, };
|
||||||
|
@ -264,14 +268,14 @@ void menu_init_base(void)
|
||||||
for (l = 0; l < 8; l++)
|
for (l = 0; l < 8; l++)
|
||||||
{
|
{
|
||||||
unsigned char fd8x8 = fontdata8x8[c*8+l];
|
unsigned char fd8x8 = fontdata8x8[c*8+l];
|
||||||
if (fd8x8&0x80) *fd = 0xf0;
|
if (fd8x8&0x80) { *fd = 0xf0; }
|
||||||
if (fd8x8&0x40) *fd |= 0x0f; fd++;
|
if (fd8x8&0x40) { *fd |= 0x0f; }; fd++;
|
||||||
if (fd8x8&0x20) *fd = 0xf0;
|
if (fd8x8&0x20) { *fd = 0xf0; }
|
||||||
if (fd8x8&0x10) *fd |= 0x0f; fd++;
|
if (fd8x8&0x10) { *fd |= 0x0f; }; fd++;
|
||||||
if (fd8x8&0x08) *fd = 0xf0;
|
if (fd8x8&0x08) { *fd = 0xf0; }
|
||||||
if (fd8x8&0x04) *fd |= 0x0f; fd++;
|
if (fd8x8&0x04) { *fd |= 0x0f; }; fd++;
|
||||||
if (fd8x8&0x02) *fd = 0xf0;
|
if (fd8x8&0x02) { *fd = 0xf0; }
|
||||||
if (fd8x8&0x01) *fd |= 0x0f; fd++;
|
if (fd8x8&0x01) { *fd |= 0x0f; }; fd++;
|
||||||
}
|
}
|
||||||
fd += 8*2/2; // 2 empty lines
|
fd += 8*2/2; // 2 empty lines
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue