OSDN Git Service

Check return values of functions declared with warn_unused_result
authorjimb <jimb>
Tue, 6 Jan 2009 18:31:58 +0000 (18:31 +0000)
committerjimb <jimb>
Tue, 6 Jan 2009 18:31:58 +0000 (18:31 +0000)
commit2bbe1ebf3c2a45b0410ab066137a4f8143e3d52d
tree3cb015870c80660cd5c1c0d8aea26b639cae2115
parenta882a9b2b386fa8422d6b6f9d21f4cc248ddfb40
Check return values of functions declared with warn_unused_result
attribute in GLIBC 2.8.
* cli/cli-cmds.c (pwd_command): Check return value from getcwd.
* inflow.c (check_syscall): New function.
(new_tty): Use check_syscall to check return values from open and dup.
* linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
* main.c (captured_main): Call cwd after setting up gdb_stderr;
check for errors from getcwd.
* mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
* ui-file.c (stdio_file_write): Ignore return value from fwrite.
(stdio_file_fputs): Same.
* utils.c (internal_vproblem): abort if last-ditch error message
write fails.
gdb/ChangeLog
gdb/cli/cli-cmds.c
gdb/inflow.c
gdb/linux-nat.c
gdb/main.c
gdb/mi/mi-cmd-env.c
gdb/ui-file.c
gdb/utils.c