History

avcodec/cbs_vp8: Don't leave out ... in calls to variadic macros

It is undefined behaviour (see C11, 6.10.3 (4); see also 14dd0a9057019e97ff9438f6cc1502f6922acb85).

Andreas Rheinhardt committed 2 years ago

Commit fe080581 parent 76b41511 file · +5 −5Browse files

Unified · Split

libavcodec/cbs_vp8.c+5−5
@@ -223,19 +223,19 @@ static int cbs_vp8_read_unsigned_le(CodedBitstreamContext *ctx, GetBitContext *g · 222 unmodified lines
223#define SUBSCRIPTS(subs, ...) \223#define SUBSCRIPTS(subs, ...) \
224 (subs > 0 ? ((int[subs + 1]){subs, __VA_ARGS__}) : NULL)224 (subs > 0 ? ((int[subs + 1]){subs, __VA_ARGS__}) : NULL)
225 225
226#define f(width, name) xf(width, name, 0)226#define f(width, name) xf(width, name, 0, )
227 227
228// bool [de|en]coder methods.228// bool [de|en]coder methods.
229#define bc_f(width, name) bc_unsigned_subs(width, DEFAULT_PROB, true, name, 0)229#define bc_f(width, name) bc_unsigned_subs(width, DEFAULT_PROB, true, name, 0, )
230#define bc_s(width, name) bc_signed_subs(width, DEFAULT_PROB, name, 0)230#define bc_s(width, name) bc_signed_subs(width, DEFAULT_PROB, name, 0, )
231#define bc_fs(width, name, subs, ...) \231#define bc_fs(width, name, subs, ...) \
232 bc_unsigned_subs(width, DEFAULT_PROB, true, name, subs, __VA_ARGS__)232 bc_unsigned_subs(width, DEFAULT_PROB, true, name, subs, __VA_ARGS__)
233#define bc_ss(width, name, subs, ...) \233#define bc_ss(width, name, subs, ...) \
234 bc_signed_subs(width, DEFAULT_PROB, name, subs, __VA_ARGS__)234 bc_signed_subs(width, DEFAULT_PROB, name, subs, __VA_ARGS__)
235 235
236// bool [de|en]coder methods for boolean value and disable tracing.236// bool [de|en]coder methods for boolean value and disable tracing.
237#define bc_b(name) bc_unsigned_subs(1, DEFAULT_PROB, false, name, 0)237#define bc_b(name) bc_unsigned_subs(1, DEFAULT_PROB, false, name, 0, )
238#define bc_b_prob(prob, name) bc_unsigned_subs(1, prob, false, name, 0)238#define bc_b_prob(prob, name) bc_unsigned_subs(1, prob, false, name, 0, )
239 239
240#define READ240#define READ
241#define READWRITE read241#define READWRITE read

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t