diff --git a/apps/main_menu.c b/apps/main_menu.c index a2694adc39..ff09568509 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -139,7 +139,7 @@ bool show_info(void) { char s[32], s2[32]; /* avoid overflow for 8MB mod :) was: ((mp3end - mp3buf) * 1000) / 0x100000; */ - int buflen = ((mp3end - mp3buf) * 100) / 0x19999; + long buflen = ((mp3end - mp3buf) * 100) / 0x19999; int integer, decimal; bool done = false; int key; diff --git a/apps/settings.c b/apps/settings.c index 4bda34b53b..6bc7e96dcf 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -82,7 +82,7 @@ const char rec_base_directory[] = REC_BASE_DIR; #endif long lasttime = 0; -static int config_sector = 0; /* mark uninitialized */ +static long config_sector = 0; /* mark uninitialized */ static unsigned char config_block[CONFIG_BLOCK_SIZE]; @@ -629,8 +629,9 @@ void settings_calc_config_sector(void) #ifdef SIMULATOR config_sector = 61; #else - int i, partition_start; - int sector = 0; + int i; + long partition_start; + long sector = 0; if (fat_startsector(IF_MV(0)) != 0) /* There is a partition table */ { @@ -1333,7 +1334,7 @@ bool set_int(const char* string, bool done = false; int button; int org_value=*variable; - int last_value = 0x7FFFFFFF; /* out of range init */ + int last_value = __INT_MAX__; /* out of range init */ #ifdef HAVE_LCD_BITMAP if(global_settings.statusbar) @@ -1538,7 +1539,7 @@ bool set_option(const char* string, void* variable, enum optiontype type, /* This array holds the record timer interval lengths, in seconds */ static const unsigned long rec_timer_seconds[] = { - 24*60*60, /* OFF really means 24 hours, to avoid >2Gbyte files */ + 24L*60*60, /* OFF really means 24 hours, to avoid >2Gbyte files */ 5*60, /* 00:05 */ 10*60, /* 00:10 */ 15*60, /* 00:15 */ @@ -1550,10 +1551,10 @@ static const unsigned long rec_timer_seconds[] = 4*60*60, /* 04:00 */ 6*60*60, /* 06:00 */ 8*60*60, /* 08:00 */ - 10*60*60, /* 10:00 */ - 12*60*60, /* 12:00 */ - 18*60*60, /* 18:00 */ - 24*60*60 /* 24:00 */ + 10L*60*60, /* 10:00 */ + 12L*60*60, /* 12:00 */ + 18L*60*60, /* 18:00 */ + 24L*60*60 /* 24:00 */ }; unsigned int rec_timesplit_seconds(void) diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 3223cabdbe..e2bb75a62f 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -326,9 +326,9 @@ static bool is_playing; /* We are (attempting to) playing MP3 files */ static bool filling; /* We are filling the buffer with data from disk */ static bool dma_underrun; /* True when the DMA has stopped because of slow disk reading (read error, shaking) */ -static int low_watermark; /* Dynamic low watermark level */ -static int low_watermark_margin; /* Extra time in seconds for watermark */ -static int lowest_watermark_level; /* Debug value to observe the buffer +static long low_watermark; /* Dynamic low watermark level */ +static long low_watermark_margin; /* Extra time in seconds for watermark */ +static long lowest_watermark_level; /* Debug value to observe the buffer usage */ #if CONFIG_HWCODEC == MAS3587F static bool is_recording; /* We are recording */