git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
22b4667
)
examples/async.c: fix sometimes-uninitialized warning
author
Yegor Yefremov
<yegorslists@googlemail.com>
Wed, 4 Jun 2025 06:47:05 +0000 (08:47 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Tue, 10 Jun 2025 14:43:11 +0000 (16:43 +0200)
Initialize retval with EXIT_SUCCESS. Otherwise, if there are no errors,
this variable stays uninitialized.
examples/async.c
patch
|
blob
|
blame
|
history
diff --git
a/examples/async.c
b/examples/async.c
index
241bb7f
..
4fc9631
100644
(file)
--- a/
examples/async.c
+++ b/
examples/async.c
@@
-30,7
+30,7
@@
int main(int argc, char **argv)
struct ftdi_context *ftdi;
int do_read = 0;
int do_write = 0;
- int i, f, retval;
+ int i, f, retval = EXIT_SUCCESS;
if ((ftdi = ftdi_new()) == 0)
{