[PATCH] gdb: check result of gdb_fopen_cloexec in dump_binary_file

Tom Tromey tom@tromey.com
Mon Apr 26 15:25:39 GMT 2021


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

Simon> On 2021-04-26 10:17 a.m., Tom Tromey wrote:>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>> 
Simon> PR gdb/27773
Simon> * cli/cli-dump.c (dump_binary_file): Check result of
Simon> gdb_fopen_cloexec.
>> 
>> Looks good.
>> 
>> I wonder whether gdb_fopen_cloexec should be declared
>> ATTRIBUTE_WARN_UNUSED_RESULT.

Simon> Would that help in this case?  The return value is used, so I presume it
Simon> wouldn't warn.

Haha, I guess not.

Tom


More information about the Gdb-patches mailing list