again

Ken Arromdee arrom at aplcen.apl.jhu.edu
Wed Apr 19 04:14:12 AEST 1989


>You have declared getuid() to return an unsigned short.  Setuid expects
>its argument to be an int.  Lint(1) complains.
>John E Van Deusen III, PO Box 9283, Boise, ID  83707, (208) 343-1865

I just tried it again, only adding a cast to int.  The same problem happened.
This was expected, since C (at least pre-ANSI) widens arguments of short to int.
Thus, setuid would be getting an int anyway, despite the fact that I omitted
the cast.
--
"But then, two Dr. McCoy's just might bring the level of medical efficiency on
this ship up to acceptable levels."

Kenneth Arromdee (UUCP: ....!jhunix!ins_akaa; BITNET: g49i0188 at jhuvm;
     INTERNET: arromdee at crabcake.cs.jhu.edu) (please, no mail to arrom at aplcen)



More information about the Comp.unix.questions mailing list