Skip to content

Commit ea3e47a

Browse files
committed
FIX: warning: __VA_ARGS__ can only appear in the expansion of a C99 variadic macro
1 parent cf9b34b commit ea3e47a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

make/tools/make-reb-lib.reb

+5-1
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,12 @@ func-header: [
132132
demit [tab p2 ","]
133133
remit [tab p1 "(*" p2l ")" p3 ";"]
134134
args: count p3 #","
135+
argsd: either find args "__VA_ARGS__" [
136+
;warning: __VA_ARGS__ can only appear in the expansion of a C99 variadic macro
137+
replace copy args "__VA_ARGS__" "..."
138+
][ args ]
135139
m: tail mlib
136-
memit/nol ["#define " p2u args]
140+
memit/nol ["#define " p2u argsd]
137141
memit [pads m 35 " RL->" p2l args]
138142
if w: find cmt "****" [append clear w "*/"]
139143
memit ["/*^/**^-" spec "^/**" cmt newline]

0 commit comments

Comments
 (0)