diff --git a/src/common.cc b/src/common.cc index 5c29c86b..34851f23 100644 --- a/src/common.cc +++ b/src/common.cc @@ -772,7 +772,7 @@ void print_github(struct text_object *obj, char *p, unsigned int p_max_size) { curl_easy_setopt(curl, CURLOPT_URL, github_url); #if defined(CURLOPT_ACCEPT_ENCODING) curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip"); -#else /* defined(CURLOPT_ACCEPT_ENCODING) */ +#else /* defined(CURLOPT_ACCEPT_ENCODING) */ curl_easy_setopt(curl, CURLOPT_ENCODING, "gzip"); #endif /* defined(CURLOPT_ACCEPT_ENCODING) */ curl_easy_setopt(curl, CURLOPT_USERAGENT, user_agent); diff --git a/src/data-source.hh b/src/data-source.hh index cdc6a739..fc79ab32 100644 --- a/src/data-source.hh +++ b/src/data-source.hh @@ -101,7 +101,7 @@ template class register_data_source { template static int factory(lua::state *l, const std::string &name, - const Args &...args) { + const Args &... args) { T *t = static_cast(l->newuserdata(sizeof(T))); l->insert(1); new (t) T(l, name, args...); @@ -113,7 +113,7 @@ class register_data_source { public: template - explicit register_data_source(const std::string &name, Args &&...args) { + explicit register_data_source(const std::string &name, Args &&... args) { priv::do_register_data_source( name, std::bind(&factory, std::placeholders::_1, name, args...)); diff --git a/src/fs.cc b/src/fs.cc index 3d6e0ff6..886360ef 100644 --- a/src/fs.cc +++ b/src/fs.cc @@ -167,7 +167,7 @@ void get_fs_type(const char *path, char *result) { return; #elif defined(__sun) assert(0); /* not used - see update_fs_stat() */ -#else /* HAVE_STRUCT_STATFS_F_FSTYPENAME */ +#else /* HAVE_STRUCT_STATFS_F_FSTYPENAME */ struct mntent *me; FILE *mtab = setmntent("/proc/mounts", "r"); diff --git a/src/libmpdclient.cc b/src/libmpdclient.cc index be058698..ae47ec2f 100644 --- a/src/libmpdclient.cc +++ b/src/libmpdclient.cc @@ -115,7 +115,7 @@ static int do_connect_fail(mpd_Connection *connection, return (connect(connection->sock, serv_addr, addrlen) == SOCKET_ERROR && WSAGetLastError() != WSAEWOULDBLOCK); } -#else /* !WIN32 (sane operating systems) */ +#else /* !WIN32 (sane operating systems) */ static int do_connect_fail(mpd_Connection *connection, const struct sockaddr *serv_addr, int addrlen) { int flags = fcntl(connection->sock, F_GETFL, 0); @@ -247,7 +247,7 @@ static int mpd_connect(mpd_Connection *connection, const char *host, int port, connection->error = MPD_ERROR_UNKHOST; return -1; } -#else /* HAVE_GETHOSTBYNAME_R */ +#else /* HAVE_GETHOSTBYNAME_R */ if (!(he_res = gethostbyname(host))) { snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "host \"%s\" not found", host); diff --git a/src/linux.cc b/src/linux.cc index a96ae0f9..5efe3c90 100644 --- a/src/linux.cc +++ b/src/linux.cc @@ -3079,5 +3079,5 @@ void get_top_info(void) { calc_cpu_each(total); /* and then the percentage for each task */ #ifdef BUILD_IOSTATS calc_io_each(); /* percentage of I/O for each task */ -#endif /* BUILD_IOSTATS */ +#endif /* BUILD_IOSTATS */ } diff --git a/src/logging.h b/src/logging.h index 92dd5c07..927a0053 100644 --- a/src/logging.h +++ b/src/logging.h @@ -65,7 +65,7 @@ void clean_up(void *memtofree1, void *memtofree2); void clean_up_without_threads(void *memtofree1, void *memtofree2); template -inline void gettextize_format(const char *format, Args &&...args) { +inline void gettextize_format(const char *format, Args &&... args) { fprintf(stderr, _(format), args...); } @@ -74,7 +74,7 @@ inline void gettextize_format(const char *format, Args &&...args) { inline void gettextize_format(const char *format) { fputs(_(format), stderr); } template -void NORM_ERR(const char *format, Args &&...args) { +void NORM_ERR(const char *format, Args &&... args) { fprintf(stderr, PACKAGE_NAME ": "); gettextize_format(format, args...); fputs("\n", stderr); @@ -83,7 +83,7 @@ void NORM_ERR(const char *format, Args &&...args) { /* critical error */ template inline void CRIT_ERR(void *memtofree1, void *memtofree2, const char *format, - Args &&...args) { + Args &&... args) { NORM_ERR(format, args...); clean_up(memtofree1, memtofree2); exit(EXIT_FAILURE); @@ -91,7 +91,7 @@ inline void CRIT_ERR(void *memtofree1, void *memtofree2, const char *format, template inline void THREAD_CRIT_ERR(void *memtofree1, void *memtofree2, - const char *format, Args &&...args) { + const char *format, Args &&... args) { NORM_ERR(format, args...); clean_up_without_threads(memtofree1, memtofree2); return; diff --git a/src/luamm.hh b/src/luamm.hh index 16472b29..e96d7ece 100644 --- a/src/luamm.hh +++ b/src/luamm.hh @@ -312,7 +312,7 @@ class state : private std::mutex { // allocate a new lua userdata of appropriate size, and create a object in it // pushes the userdata on stack and returns the pointer template - T *createuserdata(Args &&...args); + T *createuserdata(Args &&... args); using std::mutex::lock; using std::mutex::try_lock; @@ -365,7 +365,7 @@ class stack_sentry { }; template -T *state::createuserdata(Args &&...args) { +T *state::createuserdata(Args &&... args) { stack_sentry s(*this); void *t = newuserdata(sizeof(T)); diff --git a/src/net_stat.cc b/src/net_stat.cc index d0c61679..0aaebade 100644 --- a/src/net_stat.cc +++ b/src/net_stat.cc @@ -121,7 +121,7 @@ void parse_net_stat_arg(struct text_object *obj, const char *arg, #ifdef BUILD_IPV6 bool shownetmask = false; bool showscope = false; -#endif /* BUILD_IPV6 */ +#endif /* BUILD_IPV6 */ char nextarg[21]; // longest arg possible is a devname (max 20 chars) int i = 0; struct net_stat *netstat = nullptr; @@ -169,7 +169,7 @@ void parse_net_stat_arg(struct text_object *obj, const char *arg, netstat = get_net_stat(nextarg, obj, free_at_crash); #ifdef BUILD_IPV6 } -#endif /* BUILD_IPV6 */ +#endif /* BUILD_IPV6 */ i += strlen(nextarg); // skip this arg while ( !((isspace(static_cast(arg[i])) != 0) || arg[i] == 0)) { diff --git a/src/scroll.cc b/src/scroll.cc index 36188d6f..25b9875b 100644 --- a/src/scroll.cc +++ b/src/scroll.cc @@ -52,7 +52,7 @@ inline int scroll_character_length(char c) { return len; } -#else /* BUILD_X11 */ +#else /* BUILD_X11 */ (void)c; #endif /* BUILD_X11 */ diff --git a/src/specials.cc b/src/specials.cc index fd84c28f..8ba04efc 100644 --- a/src/specials.cc +++ b/src/specials.cc @@ -419,7 +419,7 @@ void new_gauge(struct text_object *obj, char *p, unsigned int p_max_size, if (out_to_stdout.get(*state)) { new_gauge_in_shell(obj, p, p_max_size, usage); } -#else /* BUILD_X11 */ +#else /* BUILD_X11 */ new_gauge_in_shell(obj, p, p_max_size, usage); #endif /* BUILD_X11 */ } @@ -729,7 +729,7 @@ void new_bar(struct text_object *obj, char *p, unsigned int p_max_size, if (out_to_stdout.get(*state)) { new_bar_in_shell(obj, p, p_max_size, usage); } -#else /* BUILD_X11 */ +#else /* BUILD_X11 */ new_bar_in_shell(obj, p, p_max_size, usage); #endif /* BUILD_X11 */ } diff --git a/src/top.cc b/src/top.cc index e7ca5469..e219a7bf 100644 --- a/src/top.cc +++ b/src/top.cc @@ -587,7 +587,7 @@ int parse_top_args(const char *s, const char *arg, struct text_object *obj) { } else { #ifdef BUILD_IOSTATS NORM_ERR("Must be top, top_mem, top_time or top_io"); -#else /* BUILD_IOSTATS */ +#else /* BUILD_IOSTATS */ NORM_ERR("Must be top, top_mem or top_time"); #endif /* BUILD_IOSTATS */ free_and_zero(obj->data.opaque); @@ -629,7 +629,7 @@ int parse_top_args(const char *s, const char *arg, struct text_object *obj) { NORM_ERR( "must be one of: name, cpu, pid, mem, time, mem_res, mem_vsize, " "io_read, io_write, io_perc"); -#else /* BUILD_IOSTATS */ +#else /* BUILD_IOSTATS */ NORM_ERR("must be one of: name, cpu, pid, mem, time, mem_res, mem_vsize"); #endif /* BUILD_IOSTATS */ free_and_zero(td->s); diff --git a/src/update-cb.hh b/src/update-cb.hh index dfb1e47a..dab4c6c6 100644 --- a/src/update-cb.hh +++ b/src/update-cb.hh @@ -42,7 +42,7 @@ template class callback_handle; void run_all_callbacks(); template -callback_handle register_cb(uint32_t period, Params &&...params); +callback_handle register_cb(uint32_t period, Params &&... params); namespace priv { class callback_base { @@ -88,7 +88,7 @@ class callback_base { template friend callback_handle conky::register_cb(uint32_t period, - Params &&...params); + Params &&... params); friend void conky::run_all_callbacks(); @@ -140,11 +140,11 @@ class callback_handle : private std::shared_ptr { friend void conky::run_all_callbacks(); template friend callback_handle register_cb(uint32_t period, - Params &&...params); + Params &&... params); }; template -callback_handle register_cb(uint32_t period, Params &&...params) { +callback_handle register_cb(uint32_t period, Params &&... params) { return std::dynamic_pointer_cast( priv::callback_base::do_register_cb(priv::callback_base::handle( new Callback(period, std::forward(params)...)))); diff --git a/tests/catch2/catch.hpp b/tests/catch2/catch.hpp index 266cf43d..c7616655 100644 --- a/tests/catch2/catch.hpp +++ b/tests/catch2/catch.hpp @@ -5649,7 +5649,7 @@ bool isDebuggerActive(); // raise() called from it, i.e. one stack frame below. #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) #define CATCH_TRAP() asm volatile("int $3") /* NOLINT */ -#else // Fall back to the generic way. +#else // Fall back to the generic way. #include #define CATCH_TRAP() raise(SIGTRAP)