Warnings removed

This commit is contained in:
bsongis
2012-05-14 06:33:52 +00:00
parent e3c81400bc
commit 3e4677f0b8
3 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -257,7 +257,7 @@ bool EeFsOpen() // TODO inline?
fflush(stdout);
}
if (eeFs.mySize != sizeof(eeFs)) {
printf("bad eeFs.mySize (%d instead of %d)\n", eeFs.mySize, sizeof(eeFs));
printf("bad eeFs.mySize (%u instead of %u)\n", eeFs.mySize, sizeof(eeFs));
fflush(stdout);
}
#endif
+4 -4
View File
@@ -111,13 +111,13 @@ static uint8_t s_copyMode = 0;
static int8_t s_copySrcRow;
static int8_t s_copyTgtOfs;
inline int8_t eeFindEmptyModel(uint8_t id, bool down)
inline uint8_t eeFindEmptyModel(uint8_t id, bool down)
{
int8_t i = id;
uint8_t i = id;
for (;;) {
i = (MAX_MODELS + (down ? i+1 : i-1)) % MAX_MODELS;
if (!eeModelExists(i)) break;
if (i == id) return -1; // no free space in directory left
if (i == id) return 0xff; // no free space in directory left
}
return i;
}
@@ -364,7 +364,7 @@ void menuProcModelSelect(uint8_t event)
s_copySrcRow = oldSub;
// find a hole (in the first empty slot above / below)
m_posVert = eeFindEmptyModel(s_copySrcRow, _event==EVT_KEY_FIRST(KEY_DOWN));
if (m_posVert == (uint8_t)-1) {
if (m_posVert == 0xff) {
// no free room for duplicating the model
AUDIO_ERROR();
m_posVert = oldSub;
-1
View File
@@ -671,7 +671,6 @@ void eeReadAll();
bool eeModelExists(uint8_t id);
uint16_t eeLoadModelName(uint8_t id, char *name);
void eeLoadModel(uint8_t id);
int8_t eeFindEmptyModel(uint8_t id, bool down);
void generalDefault();
void modelDefault(uint8_t id);
void resetProto();