[Tarantool-patches] [PATCH 13/22] backtrace: use void for empty args

Cyrill Gorcunov gorcunov at gmail.com
Fri Jul 3 17:45:17 MSK 2020


Part-of #4718

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 src/lib/core/backtrace.cc | 6 +++---
 src/lib/core/backtrace.h  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/core/backtrace.cc b/src/lib/core/backtrace.cc
index 946420885..456ce9a4d 100644
--- a/src/lib/core/backtrace.cc
+++ b/src/lib/core/backtrace.cc
@@ -65,7 +65,7 @@ struct proc_cache_entry {
 };
 
 void
-backtrace_proc_cache_clear()
+backtrace_proc_cache_clear(void)
 {
 	if (proc_cache == NULL)
 		return;
@@ -131,7 +131,7 @@ get_proc_name(unw_cursor_t *unw_cur, unw_word_t *offset, bool skip_cache)
 }
 
 char *
-backtrace()
+backtrace(void)
 {
 	int frame_no = 0;
 	unw_word_t sp = 0, old_sp = 0, ip, offset;
@@ -434,7 +434,7 @@ backtrace_foreach(backtrace_cb cb, coro_context *coro_ctx, void *cb_ctx)
 }
 
 void
-print_backtrace()
+print_backtrace(void)
 {
 	fdprintf(STDERR_FILENO, "%s", backtrace());
 }
diff --git a/src/lib/core/backtrace.h b/src/lib/core/backtrace.h
index ffdc9cd8e..c119d5402 100644
--- a/src/lib/core/backtrace.h
+++ b/src/lib/core/backtrace.h
@@ -40,7 +40,7 @@ extern "C" {
 #ifdef ENABLE_BACKTRACE
 #include <coro.h>
 
-void print_backtrace();
+void print_backtrace(void);
 
 typedef int (backtrace_cb)(int frameno, void *frameret,
                            const char *func, size_t offset, void *cb_ctx);
@@ -50,7 +50,7 @@ void
 backtrace_foreach(backtrace_cb cb, coro_context *coro_ctx, void *cb_ctx);
 
 void
-backtrace_proc_cache_clear();
+backtrace_proc_cache_clear(void);
 
 #endif /* ENABLE_BACKTRACE */
 
-- 
2.26.2



More information about the Tarantool-patches mailing list