Skip to content

Commit 6ead22f

Browse files
ntocmassiot
authored andcommitted
tests: fix potentially uninitialized variables
1 parent 6212117 commit 6ead22f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/upipe_a52_framer_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static void test_input(struct upipe *upipe, struct uref *uref,
109109

110110
uint8_t *buffer = malloc(size);
111111
assert(buffer);
112-
uref_block_extract(uref, 0, size, buffer);
112+
ubase_assert(uref_block_extract(uref, 0, size, buffer));
113113

114114
assert(size == a52_get_frame_size(a52_get_fscod(buffer),
115115
a52_get_frmsizecod(buffer)));

tests/upipe_avcodec_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ static int catch_avcenc(struct uprobe *uprobe, struct upipe *upipe,
131131
return uprobe_throw_next(uprobe, upipe, event, args);
132132
}
133133

134-
upipe_get_flow_def(upipe, &flow);
134+
ubase_assert(upipe_get_flow_def(upipe, &flow));
135135
assert(flow != NULL);
136-
uref_xflow_get_num(flow, &num);
137-
uref_flow_get_def(flow, &def);
136+
ubase_assert(uref_xflow_get_num(flow, &num));
137+
ubase_assert(uref_flow_get_def(flow, &def));
138138
assert(def != NULL);
139139

140140
/* decoder lives in encoder's thread */

tests/upipe_multicat_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static void test_input(struct upipe *upipe, struct uref *uref,
154154

155155
static uint64_t systime = 0;
156156
uint64_t cr_sys;
157-
uref_clock_get_cr_sys(uref, &cr_sys);
157+
ubase_assert(uref_clock_get_cr_sys(uref, &cr_sys));
158158
assert(cr_sys == systime);
159159

160160
int size = -1;

0 commit comments

Comments
 (0)