diff --git a/tkrzw_langc.cc b/tkrzw_langc.cc index 01d8b32..fc8e56a 100644 --- a/tkrzw_langc.cc +++ b/tkrzw_langc.cc @@ -129,7 +129,7 @@ void tkrzw_set_last_status(int32_t code, const char* message) { } } -TkrzwStatus tkrzw_get_last_status() { +TkrzwStatus tkrzw_get_last_status(void) { TkrzwStatus status; status.code = last_status.GetCode(); if (last_status.HasMessage()) { @@ -141,11 +141,11 @@ TkrzwStatus tkrzw_get_last_status() { return status; } -int32_t tkrzw_get_last_status_code() { +int32_t tkrzw_get_last_status_code(void) { return last_status.GetCode(); } -const char* tkrzw_get_last_status_message() { +const char* tkrzw_get_last_status_message(void) { if (last_status.HasMessage()) { last_message = last_status.GetMessage(); return last_message.c_str(); @@ -157,7 +157,7 @@ const char* tkrzw_status_code_name(int32_t code) { return Status::CodeName(static_cast(code)); } -double tkrzw_get_wall_time() { +double tkrzw_get_wall_time(void) { try { return GetWallTime(); } catch (const std::exception& e) { @@ -166,7 +166,7 @@ double tkrzw_get_wall_time() { } } -int64_t tkrzw_get_memory_capacity() { +int64_t tkrzw_get_memory_capacity(void) { try { return GetMemoryCapacity(); } catch (const std::exception& e) { @@ -175,7 +175,7 @@ int64_t tkrzw_get_memory_capacity() { } } -int64_t tkrzw_get_memory_usage() { +int64_t tkrzw_get_memory_usage(void) { try { return GetMemoryUsage(); } catch (const std::exception& e) { diff --git a/tkrzw_langc.h b/tkrzw_langc.h index 0b582ed..7f25a30 100644 --- a/tkrzw_langc.h +++ b/tkrzw_langc.h @@ -216,13 +216,13 @@ void tkrzw_set_last_status(int32_t code, const char* message); * @details The region of the message string is available until the this function or * tkrzw_get_last_status_message function is called next time. */ -TkrzwStatus tkrzw_get_last_status(); +TkrzwStatus tkrzw_get_last_status(void); /** * Gets the status code of the last system operation. * @return The status code of the last system operation. */ -int32_t tkrzw_get_last_status_code(); +int32_t tkrzw_get_last_status_code(void); /** * Gets the status message of the last system operation. @@ -230,7 +230,7 @@ int32_t tkrzw_get_last_status_code(); * @details The region of the message string is available until the this function or * tkrzw_get_last_status function is called next time. */ -const char* tkrzw_get_last_status_message(); +const char* tkrzw_get_last_status_message(void); /** * Gets the string name of a status code. @@ -243,19 +243,19 @@ const char* tkrzw_status_code_name(int32_t code); * Gets the number of seconds since the UNIX epoch. * @return The number of seconds since the UNIX epoch with microsecond precision. */ -double tkrzw_get_wall_time(); +double tkrzw_get_wall_time(void); /** * Gets the memory capacity of the platform. * @return The memory capacity of the platform in bytes, or -1 on failure. */ -int64_t tkrzw_get_memory_capacity(); +int64_t tkrzw_get_memory_capacity(void); /** * Gets the current memory usage of the process. * @return The current memory usage of the process in bytes, or -1 on failure. */ -int64_t tkrzw_get_memory_usage(); +int64_t tkrzw_get_memory_usage(void); /** * Primary hash function for the hash database. diff --git a/tkrzw_langc_check.c b/tkrzw_langc_check.c index 53e5319..628b9b1 100644 --- a/tkrzw_langc_check.c +++ b/tkrzw_langc_check.c @@ -19,7 +19,7 @@ #include "tkrzw_langc.h" -void print_usage() { +void print_usage(void) { fprintf(stderr, "usage: tkrzw_lang_check [path [params [iters]]]\n"); }