10307 chown: NULL pointer errors

Review Request #1400 — Created Jan. 27, 2019 and submitted

tsoome
illumos-gate
10307
7c7edbd...
general
chown.c: In function 'chownr':
chown.c:175:28: error: comparison between pointer and integer [-Werror]
  if (getcwd(savedir, 1024) == NULL)
                            ^~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
rm
  1. 
      
  2. usr/src/ucbcmd/chown/chown.c (Diff revision 1)
     
     
    Is this using a different definition of getcwd() where getcwd() returns an integer and not a 'char *'? It looks like we're not including unistd.h here and maybe that's causing us to get the default C behavior of a function returning an int?
    1. Thats my error:)

    2. I'm somewhat relieved that there isn't another secret copy of getcwd() in ucb. I kind of assumed there was.

  3. 
      
tsoome
rm
  1. Ship It!
  2. 
      
andy_js
  1. Ship It!
  2. 
      
domag02
  1. 
      
  2. usr/src/ucbcmd/chown/chown.c (Diff revision 1)
     
     
    Space followed by tab.
  3. 
      
tsoome
andy_js
  1. Ship It!
  2. 
      
rm
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...