From f43d9abbb8ff403518e35ea4ab2ddfaee6621647 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:52:13 -0600 Subject: [PATCH] fix compiler warnings - SmartAudio CMS menu casting FREQ, FREQ POR * NEEDS further TESTING --- src/main/cms/cms.c | 2 +- src/main/cms/cms_menu_vtx_smartaudio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/cms/cms.c b/src/main/cms/cms.c index c775c222e4..3a4730f66f 100644 --- a/src/main/cms/cms.c +++ b/src/main/cms/cms.c @@ -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); diff --git a/src/main/cms/cms_menu_vtx_smartaudio.c b/src/main/cms/cms_menu_vtx_smartaudio.c index 77622df9e7..319da7d40e 100644 --- a/src/main/cms/cms_menu_vtx_smartaudio.c +++ b/src/main/cms/cms_menu_vtx_smartaudio.c @@ -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 */ @@ -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 },