From 9f2e7736a8f40dca720cfc389e1fddf6a6d98461 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Thu, 9 Nov 2023 15:18:09 +0900 Subject: [PATCH] fix: add function prototypes --- src/context.c | 4 ++-- src/msym.h | 4 ++-- src/msym_error.c | 2 +- src/msym_error.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/context.c b/src/context.c index dbb377d..dfd736f 100644 --- a/src/context.c +++ b/src/context.c @@ -67,7 +67,7 @@ struct _msym_context { * Public API ***********************/ -msym_context msymCreateContext(){ +msym_context msymCreateContext(void){ msym_context ctx = malloc(sizeof(struct _msym_context)); msym_thresholds_t *threshols = malloc(sizeof(msym_thresholds_t)); @@ -90,7 +90,7 @@ msym_context msymCreateContext(){ return NULL; } -const msym_thresholds_t *msymGetDefaultThresholds(){ +const msym_thresholds_t *msymGetDefaultThresholds(void){ return &default_thresholds; } diff --git a/src/msym.h b/src/msym.h index 78ad491..1d4164e 100644 --- a/src/msym.h +++ b/src/msym.h @@ -162,10 +162,10 @@ extern "C" { } msym_character_table_t; - msym_context MSYM_EXPORT msymCreateContext(); + msym_context MSYM_EXPORT msymCreateContext(void); msym_error_t MSYM_EXPORT msymReleaseContext(msym_context ctx); - const msym_thresholds_t MSYM_EXPORT *msymGetDefaultThresholds(); + const msym_thresholds_t MSYM_EXPORT *msymGetDefaultThresholds(void); msym_error_t MSYM_EXPORT msymSetThresholds(msym_context ctx, const msym_thresholds_t *thresholds); msym_error_t MSYM_EXPORT msymGetThresholds(msym_context ctx, const msym_thresholds_t **thresholds); msym_error_t MSYM_EXPORT msymSetElements(msym_context ctx, int length, msym_element_t *elements); diff --git a/src/msym_error.c b/src/msym_error.c index 53483eb..98c7168 100644 --- a/src/msym_error.c +++ b/src/msym_error.c @@ -53,7 +53,7 @@ void msymSetErrorDetails(const char *format, ...){ va_end(args); } -const char MSYM_EXPORT *msymGetErrorDetails(){ +const char MSYM_EXPORT *msymGetErrorDetails(void){ snprintf(err_details_ext, sizeof(err_details_ext), "%s",err_details); // Not really necessary msymSetErrorDetails(""); return err_details_ext; diff --git a/src/msym_error.h b/src/msym_error.h index bb6cf93..01e424f 100644 --- a/src/msym_error.h +++ b/src/msym_error.h @@ -44,7 +44,7 @@ extern "C" { const char *msymErrorString(msym_error_t error); void msymSetErrorDetails(const char *format, ...); - const char *msymGetErrorDetails(); + const char *msymGetErrorDetails(void); #ifdef __cplusplus