This is the mail archive of the
mailing list for the GDB project.
Re: How to get file descriptor from abfd?
Paul Pluzhnikov wrote:
> The braces introduce a new scope for 'FILE *f'.
> If I move the declaration to the top of function, then it fails to build
> when !HAVE_MMAP:
> cc1: warnings being treated as errors
> ../../src/bfd/cache.c: In function 'cache_bmmap':
> ../../src/bfd/cache.c:404: warning: unused variable 'f'
> I left this "as is".
Yes, of course you are correct here; I forgot the complication of the #if
relating to whether the variable was needed or not.