]> git.alsa-project.org Git - alsa-utils.git/commit
axfer/test: fix uninitialized warning
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 6 May 2019 20:48:47 +0000 (05:48 +0900)
committerJaroslav Kysela <perex@perex.cz>
Tue, 7 May 2019 06:33:01 +0000 (08:33 +0200)
commit0b07c560f7b2f813e31499df58290008584271b5
treeeb2c9eae2b79a0d934638bbf5f43da9cf3e88ff3
parent0248c297575c5fab52e80ca6a6ed944ce586d185
axfer/test: fix uninitialized warning

This commit fixes uninitialized return value from a call of test_mux() and
text_demux() to suppress warnings below:

$ make check
...
gcc -DHAVE_CONFIG_H -I. -I../../include     -O2 -Wall -pipe -g -MT mapper-test.o -MD -MP -MF .deps/mapper-test.Tpo -c -o mapper-test.o mapper-test.c
mapper-test.c: In function ‘test_mapper’:
mapper-test.c:241:9: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  return err;
         ^~~
mapper-test.c:231:5: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (err < 0)
     ^

Fixes: 39d1ab8a0cb4: ('axfer: add a unit test for mapper interface')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
axfer/test/mapper-test.c