Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compiler warnings - SmartAudio CMS menu casting FREQ #975

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/cms/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static int cmsDrawMenuEntry(displayPort_t *pDisplay, OSD_Entry *p, uint8_t row)
buff[0] = 0x0;
if ((p->type == OME_Submenu) && p->func && (p->flags & OPTSTRING)) {
// Special case of sub menu entry with optional value display.
char *str = ((CMSMenuOptFuncPtr)p->func)();
char *str = ((CMSMenuOptFuncPtr)(long)p->func)();
strncpy( buff, str, CMS_DRAW_BUFFER_LEN);
}
strncat(buff, ">", CMS_DRAW_BUFFER_LEN);
Expand Down
4 changes: 2 additions & 2 deletions src/main/cms/cms_menu_vtx_smartaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static OSD_Entry saCmsMenuConfigEntries[] = {
{ "OP MODEL", OME_TAB, saCmsConfigOpmodelByGvar, &(OSD_TAB_t){ &saCmsOpmodel, 2, saCmsOpmodelNames }, DYNAMIC },
{ "FSEL MODE", OME_TAB, saCmsConfigFreqModeByGvar, &saCmsEntFselMode, DYNAMIC },
{ "PIT FMODE", OME_TAB, saCmsConfigPitFModeByGvar, &saCmsEntPitFMode, 0 },
{ "POR FREQ", OME_Submenu, (CMSEntryFuncPtr)saCmsORFreqGetString, &saCmsMenuPORFreq, OPTSTRING },
{ "POR FREQ", OME_Submenu, (CMSEntryFuncPtr)(long)saCmsORFreqGetString, &saCmsMenuPORFreq, OPTSTRING },
#ifdef USE_EXTENDED_CMS_MENUS
{ "STATX", OME_Submenu, cmsMenuChange, &saCmsMenuStats, 0 },
#endif /* USE_EXTENDED_CMS_MENUS */
Expand Down Expand Up @@ -534,7 +534,7 @@ static OSD_Entry saCmsMenuFreqModeEntries[] = {
{ "- SMARTAUDIO -", OME_Label, NULL, NULL, 0 },

{ "", OME_Label, NULL, saCmsStatusString, DYNAMIC },
{ "FREQ", OME_Submenu, (CMSEntryFuncPtr)saCmsUserFreqGetString, &saCmsMenuUserFreq, OPTSTRING },
{ "FREQ", OME_Submenu, (CMSEntryFuncPtr)(long)saCmsUserFreqGetString, &saCmsMenuUserFreq, OPTSTRING },
{ "POWER", OME_TAB, saCmsConfigPowerByGvar, &saCmsEntPower, 0 },
{ "SET", OME_Submenu, cmsMenuChange, &saCmsMenuCommence, 0 },
{ "CONFIG", OME_Submenu, cmsMenuChange, &saCmsMenuConfig, 0 },
Expand Down
Loading