From 2dbb1b41f35031de711ef1cdee09a35140740f81 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 30 Oct 2016 20:45:44 +0100 Subject: [PATCH] Fix compiler warnings caused by -Wstrict-prototypes --- include/ext_ADL.h | 2 +- include/ext_nvapi.h | 4 ++-- src/Makefile | 2 ++ src/logfile.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/ext_ADL.h b/include/ext_ADL.h index 9a3322fe0..656238b6d 100644 --- a/include/ext_ADL.h +++ b/include/ext_ADL.h @@ -273,7 +273,7 @@ typedef struct struct_ADLOD6MemClockState } ADLOD6MemClockState; -typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_DESTROY) (); +typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_DESTROY) (void); typedef int (ADL_API_CALL *ADL_MAIN_CONTROL_CREATE) (ADL_MAIN_MALLOC_CALLBACK, int); typedef int (ADL_API_CALL *ADL_ADAPTER_NUMBEROFADAPTERS_GET) (int *); typedef int (ADL_API_CALL *ADL_ADAPTER_ADAPTERINFO_GET) (LPAdapterInfo, int); diff --git a/include/ext_nvapi.h b/include/ext_nvapi.h index f2883d65a..98e94a6e4 100644 --- a/include/ext_nvapi.h +++ b/include/ext_nvapi.h @@ -200,8 +200,8 @@ typedef struct struct_NV_GPU_COOLER_LEVELS } NV_GPU_COOLER_LEVELS; NVAPI_INTERFACE NvAPI_QueryInterface (unsigned int offset); -NVAPI_INTERFACE NvAPI_Initialize (); -NVAPI_INTERFACE NvAPI_Unload (); +NVAPI_INTERFACE NvAPI_Initialize (void); +NVAPI_INTERFACE NvAPI_Unload (void); NVAPI_INTERFACE NvAPI_GetErrorMessage (NvAPI_Status nr,NvAPI_ShortString szDesc); NVAPI_INTERFACE NvAPI_EnumPhysicalGPUs (NvPhysicalGpuHandle nvGPUHandle[NVAPI_MAX_PHYSICAL_GPUS], NvU32 *pGpuCount); NVAPI_INTERFACE NvAPI_GPU_GetPerfPoliciesInfo (NvPhysicalGpuHandle hPhysicalGpu, NV_GPU_PERF_POLICIES_INFO_PARAMS_V1 *perfPolicies_info); diff --git a/src/Makefile b/src/Makefile index 150e3c142..9f1a82f35 100644 --- a/src/Makefile +++ b/src/Makefile @@ -108,6 +108,8 @@ CFLAGS += -Wshadow CFLAGS += -Wmissing-declarations CFLAGS += -Wmissing-prototypes CFLAGS += -Wpointer-arith +CFLAGS += -Wcast-align +CFLAGS += -Wstrict-prototypes CFLAGS += -ftrapv LFLAGS := diff --git a/src/logfile.c b/src/logfile.c index 77b4990e1..f1d8bbf7e 100644 --- a/src/logfile.c +++ b/src/logfile.c @@ -13,7 +13,7 @@ #include "event.h" #include "logfile.h" -static int logfile_generate_id () +static int logfile_generate_id (void) { const int n = rand ();