gdb.base/fileio.c: Fix several -Wmaybe-uninitialized warnings
authorPedro Alves <palves@redhat.com>
Thu, 18 May 2017 10:40:08 +0000 (11:40 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 18 May 2017 11:56:38 +0000 (12:56 +0100)
commit59cc050d893d1e8c75547de950a35e809588f12f
treebc290206cef1b5ab97344ea246c5fb8973988901
parentc8f6abd10d62f82874e31959bf986606bd919d39
gdb.base/fileio.c: Fix several -Wmaybe-uninitialized warnings

 src/gdb/testsuite/gdb.base/fileio.c: In function ‘test_write’:
 src/gdb/testsuite/gdb.base/fileio.c:158:5: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      printf ("write 1: ret = %d, errno = %d\n", ret, errno);
      ^

gdb/ChangeLog:
2017-05-18  Pedro Alves  <palves@redhat.com>

* gdb.base/fileio.c (test_write, test_read, test_close)
(test_fstat): Don't print 'ret' in the fail path.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/fileio.c