8852 libcurses: local unused types

Review Request #778 — Created Nov. 21, 2017 and submitted

tsoome
illumos-gate
8852
a8104c0...
general
In file included from /code/illumos-gate/proto/root_i386/usr/include/fcntl.h:40:0,
                 from ../screen/tgetch.c:536:
../screen/tgetch.c: In function '_fpk':
/code/illumos-gate/proto/root_i386/usr/include/sys/fcntl.h:243:3: error: typedef 'flock_t' locally defined but not used [-Werror=unused-local-typedefs]
 } flock_t;
   ^~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/fcntl.h:273:3: error: typedef 'flock64_t' locally defined but not used [-Werror=unused-local-typedefs]
 } flock64_t;
   ^~~~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/fcntl.h:355:3: error: typedef 'fshare_t' locally defined but not used [-Werror=unused-local-typedefs]
 } fshare_t;
   ^~~~~~~~
cc1: all warnings being treated as errors


yuripv
  1. Ship It!
  2. 
      
jgmills
  1. I'd recommend that you do the first include like this:
    
    +#ifndef	FIONREAD
    +#include	<fcntl.h>
    +#endif	/* FIONREAD */
    
    and the second one like this:
    
    +#ifdef	SYSV
    +#include	<fcntl.h>
    +#endif	/* SYSV */
    
    Doing it like that retains the conditional inclusion that was present in the original.
  2. 
      
tsoome
jgmills
  1. Okay, I'm satisfied.

  2. 
      
tsoome
jgmills
  1. So, you shuffled the header files. That's fine with me.

  2. 
      
yuripv
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...