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 FREQ, POR FREQ #970

Conversation

nerdCopter
Copy link
Member

@nerdCopter nerdCopter commented Feb 23, 2024

fixes:

./src/main/cms/cms.c: In function 'cmsDrawMenuEntry':
./src/main/cms/cms.c:332:30: warning: cast between incompatible function types from 'CMSEntryFuncPtr' {aka 'long int (* const)(struct displayPort_s *, const void *)'} to 'char * (*)(void)' [-Wcast-function-type]
  332 |                 char *str = ((CMSMenuOptFuncPtr)p->func)();
      |                              ^
./src/main/cms/cms_menu_vtx_smartaudio.c:495:32: warning: cast between incompatible function types from 'char * (*)(void)' to 'long int (*)(displayPort_t *, const void *)' {aka 'long int (*)(struct displayPort_s *, const void *)'} [-Wcast-function-type]
  495 |     { "POR FREQ",  OME_Submenu, (CMSEntryFuncPtr)saCmsORFreqGetString, &saCmsMenuPORFreq,                                   OPTSTRING },
      |                                ^
./src/main/cms/cms_menu_vtx_smartaudio.c:537:28: warning: cast between incompatible function types from 'char * (*)(void)' to 'long int (*)(displayPort_t *, const void *)' {aka 'long int (*)(struct displayPort_s *, const void *)'} [-Wcast-function-type]
  537 |     { "FREQ",   OME_Submenu, (CMSEntryFuncPtr)saCmsUserFreqGetString,  &saCmsMenuUserFreq, OPTSTRING },

@nerdCopter nerdCopter marked this pull request as draft February 26, 2024 15:01
@nerdCopter nerdCopter changed the title fix compiler warnings - SmartAudio CMS menu FREQ fix compiler warnings - SmartAudio CMS menu FREQ, POR FREQ Feb 28, 2024
@nerdCopter
Copy link
Member Author

  • confirmed OSD menu items for SA/FREQ SA/POR FREQ working.
  • when setup for freq rather than band/channel, i somtimes get lost signal. both master and this PR. so no change in behavior

@nerdCopter nerdCopter marked this pull request as ready for review February 29, 2024 13:55
@nerdCopter nerdCopter merged commit 9136d4c into emuflight:master Feb 29, 2024
6 checks passed
@nerdCopter nerdCopter deleted the 20240223_fix_compile_warnings_SmartAudio branch February 29, 2024 13:55
@nerdCopter nerdCopter restored the 20240223_fix_compile_warnings_SmartAudio branch June 26, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant