Fix warnings

This commit is contained in:
Stefan Bühler 2008-07-08 01:59:58 +02:00
parent 6f3ffa2ea8
commit b471b98d5c
2 changed files with 6 additions and 7 deletions

2
README
View File

@ -106,7 +106,7 @@ ENV_NON_RESIDENT The same as ENV_UID, but controls the name of the NON_RESI
There is no Makefile right now, but compile is as simple as: There is no Makefile right now, but compile is as simple as:
> gcc -O2 -o execwrap execwrap.c && strip execwrap > gcc -W -Wall -O2 -o execwrap execwrap.c && strip execwrap
Or similar, depending on taste. You need something other than an ancient compiler to make Or similar, depending on taste. You need something other than an ancient compiler to make
it work, preferably C99. To install, make sure the file is owned by the super user and has it work, preferably C99. To install, make sure the file is owned by the super user and has

View File

@ -123,7 +123,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <unistd.h> #include <unistd.h>
#include <signal.h> #include <signal.h>
#include <pwd.h> #include <pwd.h>
#include <sys/types.h>
#include <grp.h>
/* The global child PID and previous SIGTERM handler. */ /* The global child PID and previous SIGTERM handler. */
int pid; int pid;
@ -176,16 +177,14 @@ int main(int argc, char* argv[], char* envp[])
} }
/* Grab stuff from environment, and set defaults. */ /* Grab stuff from environment, and set defaults. */
int uid = DEFAULT_UID; uid_t uid = DEFAULT_UID;
int gid = DEFAULT_GID; gid_t gid = DEFAULT_GID;
char* target = 0; char* target = 0;
char* args = 0;
char check_gid = 0; char check_gid = 0;
char non_resident = 0; char non_resident = 0;
char** p = envp; char** p = envp;
char* s; char* s;
char* t; while(NULL != (s = *p++))
while(s = *p++)
{ {
/* Target UID. */ /* Target UID. */