From 308f42f68c186396433b03f4cef1529c7dd280da Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 6 Nov 2017 01:52:03 +0100 Subject: [PATCH 1/1] gcc-compat.h: Remove _static_inline_ macro. The only purpose of this macro is to have a way to include static inline functions into the doxygen source code documentation (but omit normal static functions in .c files). Since dss does not use doxygen, the macro is pointless. Remove the equally pointless documentation of dss_rename(), one of the two users of _static_inline_, while converting it to plain static inline. --- file.h | 12 +----------- gcc-compat.h | 2 -- snap.h | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/file.h b/file.h index 140a505..f82643a 100644 --- a/file.h +++ b/file.h @@ -5,17 +5,7 @@ */ int for_each_subdir(int (*func)(const char *, void *), void *private_data); __must_check int mark_fd_nonblocking(int fd); -/** - * A wrapper for rename(2). - * - * \param old_path The source path. - * \param new_path The destination path. - * - * \return Standard. - * - * \sa rename(2). - */ -_static_inline_ int dss_rename(const char *old_path, const char *new_path) +static inline int dss_rename(const char *old_path, const char *new_path) { if (rename(old_path, new_path) >= 0) return 1; diff --git a/gcc-compat.h b/gcc-compat.h index 2622fd3..258a3cb 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -25,5 +25,3 @@ #else # define __must_check /* no warn_unused_result */ #endif - -#define _static_inline_ static inline diff --git a/snap.h b/snap.h index 626ecad..489b67a 100644 --- a/snap.h +++ b/snap.h @@ -93,7 +93,7 @@ int num_complete_snapshots(struct snapshot_list *sl); /** * Get the newest snapshot in a snapshot list. */ -_static_inline_ struct snapshot *get_newest_snapshot(struct snapshot_list *sl) +static inline struct snapshot *get_newest_snapshot(struct snapshot_list *sl) { if (!sl->num_snapshots) return NULL; -- 2.39.2