Fix warning: assignment makes pointer from integer without a cast.

This commit is contained in:
Marek Bel 2019-03-05 16:27:47 +01:00
parent 23859921b9
commit 5b9e7c4fe7

View File

@ -77,7 +77,7 @@ uint8_t lang_select(uint8_t lang)
if (lang_check(table)) if (lang_check(table))
if (pgm_read_dword(((uint32_t*)(table + 12))) == pgm_read_dword(((uint32_t*)(_PRI_LANG_SIGNATURE)))) //signature valid if (pgm_read_dword(((uint32_t*)(table + 12))) == pgm_read_dword(((uint32_t*)(_PRI_LANG_SIGNATURE)))) //signature valid
{ {
lang_table = table; // set table pointer lang_table = (lang_table_t*)table; // set table pointer
lang_selected = lang; // set language id lang_selected = lang; // set language id
} }
} }
@ -157,7 +157,7 @@ uint8_t lang_get_header(uint8_t lang, lang_table_header_t* header, uint32_t* off
if (lang == LANG_ID_SEC) if (lang == LANG_ID_SEC)
{ {
uint16_t ui = _SEC_LANG_TABLE; //table pointer uint16_t ui = _SEC_LANG_TABLE; //table pointer
memcpy_P(header, ui, sizeof(lang_table_header_t)); //read table header from progmem memcpy_P(header, (lang_table_header_t*)ui, sizeof(lang_table_header_t)); //read table header from progmem
if (offset) *offset = ui; if (offset) *offset = ui;
return (header->magic == LANG_MAGIC)?1:0; //return 1 if magic valid return (header->magic == LANG_MAGIC)?1:0; //return 1 if magic valid
} }