Skip to content

Commit a326658

Browse files
author
Aengus.Jiang
committed
remove right operand of comma operator has no effect [-Wunused-value]
1 parent 7ab534a commit a326658

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/utils/error.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@ namespace detail {
6262
string_view message = ""
6363
);
6464

65-
template<typename T>
66-
void nullfn() {
67-
// this method doesn't do anything and is never called.
65+
66+
template<typename... Ts>
67+
void nullfn(Ts&&...) {
68+
// Do nothing, but ensure all parameters are "used".
6869
}
6970

70-
#define PHONY_USE(...) (nullfn<decltype(__VA_ARGS__)>())
71+
#define PHONY_USE(...) nullfn(__VA_ARGS__)
7172

7273
// Work around a compiler warning
7374
template<typename T>

0 commit comments

Comments
 (0)