Skip to content

Commit

Permalink
Chore: silence some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Nov 22, 2024
1 parent 2197cfb commit 864fb91
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/detection/brightness/brightness_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ double ddca_set_default_sleep_multiplier(double multiplier); // ddcutil 1.4
DDCA_Status ddca_init(const char *libopts, int syslog_level, int opts);
#endif

static const char* detectWithDdcci(FFBrightnessOptions* options, FFlist* result)
static const char* detectWithDdcci(FF_MAYBE_UNUSED FFBrightnessOptions* options, FFlist* result)
{
FF_LIBRARY_LOAD(libddcutil, "dlopen ddcutil failed", "libddcutil" FF_LIBRARY_EXTENSION, 5);
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(libddcutil, ddca_get_display_info_list2)
Expand Down
2 changes: 1 addition & 1 deletion src/detection/terminalfont/terminalfont_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static void detectFootTerminal(FFTerminalFontResult* terminalFont)
ffFontInitValues(&terminalFont->font, font.chars, "8");
return;
}
uint32_t size = equal + strlen("size=");
uint32_t size = equal + (uint32_t) strlen("size=");
uint32_t comma = ffStrbufNextIndexC(&font, size, ',');
if (comma < font.length)
font.chars[comma] = '\0';
Expand Down
4 changes: 2 additions & 2 deletions src/detection/wifi/wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static inline uint16_t ffWifiFreqToChannel(uint16_t frequency)
if (frequency == 2484)
return 14;
else if (frequency < 2484)
return (uint16_t) (frequency - 2407) / 5;
return (uint16_t) ((frequency - 2407) / 5);
else
return (frequency / 5) - 1000;
return (uint16_t) ((frequency / 5) - 1000);
}
2 changes: 1 addition & 1 deletion src/util/edidHelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void ffEdidGetSerialAndManufactureDate(const uint8_t edid[128], uint32_t* serial
{
if (edid[17] > 0 && edid[17] < 0xFF)
{
*year = (uint16_t) edid[17] + 1990;
*year = (uint16_t) (edid[17] + 1990);
*week = (uint16_t) edid[16];
if (*week == 0xFF) *week = 0;
}
Expand Down

0 comments on commit 864fb91

Please sign in to comment.