misc: Fix some build warnings with gcc9

ata-creativezen looks like a legit memory-trashing bug, the rtc fixes
are bitwise inversion of a bool, and the remaining are just unused
static variables.

Change-Id: I1a818d4839cd3a54ca6e85f26feb743a4a9d29dc
This commit is contained in:
Solomon Peachy 2025-09-20 23:47:51 -04:00
parent 6340e79cda
commit b71fb1f12a
5 changed files with 11 additions and 7 deletions

View file

@ -99,7 +99,7 @@ static const struct button_mapping button_context_settings_right_is_inc[] = {
static const struct button_mapping button_context_yesno[] = {
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_settings_yesno */
#if 0
static const struct button_mapping button_context_colorchooser[] = {
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
}; /* button_context_colorchooser */
@ -107,7 +107,7 @@ static const struct button_mapping button_context_colorchooser[] = {
static const struct button_mapping button_context_eq[] = {
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
}; /* button_context_eq */
#endif
/** Bookmark Screen **/
static const struct button_mapping button_context_bmark[] = {
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),

View file

@ -195,7 +195,7 @@ bool rtc_check_alarm_started(bool release_alarm)
if (run_before)
{
started = alarm_state;
alarm_state &= ~release_alarm;
alarm_state &= !release_alarm;
}
else
{

View file

@ -301,7 +301,7 @@ bool rtc_check_alarm_started(bool release_alarm)
if (run_before)
{
rc = int_flag;
int_flag &= ~release_alarm;
int_flag &= !release_alarm;
}
else
{

View file

@ -263,7 +263,7 @@ static void cfs_init(void)
/* Read root inode's first sector */
_ata_read_sectors(CFS_CLUSTER2CLUSTER(root_inode->first_class_chain[0]), 64, &sector2);
root_direntry = (struct cfs_direntry*)&sector2;
root_direntry_items = (struct cfs_direntry_item*)(&sector2+sizeof(struct cfs_direntry));
root_direntry_items = (struct cfs_direntry_item*)(&sector2[0]+sizeof(struct cfs_direntry));
logf("0x%x", root_direntry->identifier);
@ -291,7 +291,7 @@ static void cfs_init(void)
/* Read VFAT inode's first sector */
_ata_read_sectors(CFS_CLUSTER2CLUSTER(vfat_inode->first_class_chain[0]), 64, &sector2);
vfat_direntry = (struct cfs_direntry*)&sector2;
vfat_direntry_items = (struct cfs_direntry_item*)(&sector2+sizeof(struct cfs_direntry));
vfat_direntry_items = (struct cfs_direntry_item*)(&sector2[0]+sizeof(struct cfs_direntry));
/* Search for VFAT's subinodes */
for(i=0; i < vfat_direntry->items; i++)

View file

@ -1,4 +1,3 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
@ -30,6 +29,7 @@
/* for reference on these command/data hex values, see the mipi dcs lcd spec. *
* Not everything here is there, but all the standard stuff is. */
/* New Display Eroq 2.1 / Hifiwalker 1.7+ / Surfans v3.2, unknown Controller *
* (partially GC9A01 register compatible) *
* https://espruino.microcosm.app/api/v1/files/ \ *
@ -39,6 +39,7 @@
* Init sequence From 'EROS Q c口_V2.1_20231209固件.zip' *
* update.upt/.iso -> In 'uboot.bin' at 0x52da0-0x5305f *
* http://www.eroshifi.com/download/firmware/122.html */
#if !defined(BOOTLOADER) || (EROSQN_VER >= 3)
static const uint32_t erosqnative_lcd_cmd_enable_v3[] = {
/* Unlock EXTC? */
@ -154,7 +155,9 @@ static const uint32_t erosqnative_lcd_cmd_enable_v3[] = {
LCD_INSTR_UDELAY, 20000,
LCD_INSTR_END,
};
#endif
#if !defined(BOOTLOADER) || (EROSQN_VER < 3)
/* Original Display / Hifiwalker -1.5 / Surfans -2.7 */
static const uint32_t erosqnative_lcd_cmd_enable_v1[] = {
/* Set EXTC? */
@ -228,6 +231,7 @@ static const uint32_t erosqnative_lcd_cmd_enable_v1[] = {
LCD_INSTR_UDELAY, 20000,
LCD_INSTR_END,
};
#endif
static const uint32_t erosqnative_lcd_of_compat_cmd[] = {
/* Pixel Format Set */