From 23b71cc9077be6cad3eb7472129e612e393e29bf Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sat, 22 Jan 2022 23:01:09 +0100 Subject: [PATCH] Fixed some rare compilation warnings from old compilers --- src/detection/displayserver/wayland.c | 2 +- src/fastfetch.c | 2 +- src/modules/gpu.c | 2 +- src/modules/resolution.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/detection/displayserver/wayland.c b/src/detection/displayserver/wayland.c index 224473f4d..48ffefb24 100644 --- a/src/detection/displayserver/wayland.c +++ b/src/detection/displayserver/wayland.c @@ -1,9 +1,9 @@ #include "displayServer.h" +#include #ifdef FF_HAVE_WAYLAND #include #include -#include typedef struct WaylandData { diff --git a/src/fastfetch.c b/src/fastfetch.c index ee4bb9f76..e883dc961 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -329,7 +329,7 @@ static inline void listAvailablePresetsFromFolder(FFstrbuf* folder, uint8_t inde ffStrbufAppendS(folder, entry->d_name); ffStrbufAppendC(folder, '/'); - listAvailablePresetsFromFolder(folder, indentation + 1, entry->d_name); + listAvailablePresetsFromFolder(folder, (uint8_t) (indentation + 1), entry->d_name); ffStrbufSubstrBefore(folder, folderLength); continue; } diff --git a/src/modules/gpu.c b/src/modules/gpu.c index 80ecf5950..6478113c8 100644 --- a/src/modules/gpu.c +++ b/src/modules/gpu.c @@ -243,7 +243,7 @@ void ffPrintGPU(FFinstance* instance) #endif for(uint8_t i = 0; i < (uint8_t) gpus.length; i++) - printGPUResult(instance, gpus.length == 1 ? 0 : i + 1, &cache, ffListGet(&gpus, i)); + printGPUResult(instance, gpus.length == 1 ? 0 : (uint8_t) (i + 1), &cache, ffListGet(&gpus, i)); if(gpus.length == 0) ffPrintError(instance, FF_GPU_MODULE_NAME, 0, &instance->config.gpuKey, &instance->config.gpuFormat, FF_GPU_NUM_FORMAT_ARGS, "No GPUs found."); diff --git a/src/modules/resolution.c b/src/modules/resolution.c index 51d28adbd..bb9305e3c 100644 --- a/src/modules/resolution.c +++ b/src/modules/resolution.c @@ -15,7 +15,7 @@ void ffPrintResolution(FFinstance* instance) for(uint32_t i = 0; i < dsResult->resolutions.length; i++) { FFResolutionResult* result = ffListGet(&dsResult->resolutions, i); - uint8_t moduleIndex = dsResult->resolutions.length == 1 ? 0 : (uint8_t) i + 1; + uint8_t moduleIndex = dsResult->resolutions.length == 1 ? 0 : (uint8_t) (i + 1); if(instance->config.resolutionFormat.length == 0) {