summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-07-02 18:09:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-07-02 18:09:03 +0000
commitc51917f304dbea16877ad328da2d45512b751796 (patch)
treec8b82e581b98d620eeea3a3a09d8629c3f093340 /c
parentc3d20eba96e9c26f775f3abf5ca6edcbd8c23963 (diff)
downloadrtems-c51917f304dbea16877ad328da2d45512b751796.tar.bz2
Fixed format strings and warnings.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/libcsupport/src/getgrent.c6
-rw-r--r--c/src/exec/libcsupport/src/getpwent.c12
-rw-r--r--c/src/lib/libc/getgrent.c6
-rw-r--r--c/src/lib/libc/getpwent.c12
4 files changed, 18 insertions, 18 deletions
diff --git a/c/src/exec/libcsupport/src/getgrent.c b/c/src/exec/libcsupport/src/getgrent.c
index d0a92a0b80..b47ece8283 100644
--- a/c/src/exec/libcsupport/src/getgrent.c
+++ b/c/src/exec/libcsupport/src/getgrent.c
@@ -36,7 +36,7 @@ int getgrnam_r(
while (fgets (buffer, bufsize, fp)) {
sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, &grp->gr_gid,
+ groupname, password, (int *) &grp->gr_gid,
groups);
grp->gr_name = groupname;
grp->gr_passwd = password;
@@ -83,7 +83,7 @@ int getgrgid_r(
while (fgets (buffer, bufsize, fp)) {
sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, &gr_group.gr_gid,
+ groupname, password, (int *) &gr_group.gr_gid,
groups);
gr_group.gr_name = groupname;
gr_group.gr_passwd = password;
@@ -125,7 +125,7 @@ struct group *getgrent( void )
return NULL;
sscanf (buf, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, &gr_group.gr_gid,
+ groupname, password, (int *) &gr_group.gr_gid,
groups);
gr_group.gr_name = groupname;
gr_group.gr_passwd = password;
diff --git a/c/src/exec/libcsupport/src/getpwent.c b/c/src/exec/libcsupport/src/getpwent.c
index daa5d226f1..5a9b0f96c6 100644
--- a/c/src/exec/libcsupport/src/getpwent.c
+++ b/c/src/exec/libcsupport/src/getpwent.c
@@ -33,7 +33,7 @@ int getpwnam_r(
}
while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
+ sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
logname, password, &pwd->pw_uid,
&pwd->pw_gid, comment, gecos,
dir, shell);
@@ -84,7 +84,7 @@ int getpwuid_r(
}
while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
+ sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
logname, password, &pw_passwd.pw_uid,
&pw_passwd.pw_gid, comment, gecos,
dir, shell);
@@ -129,10 +129,10 @@ struct passwd *getpwent()
if (fgets (buf, sizeof (buf), passwd_fp) == NULL)
return NULL;
- sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
- logname, password, &pw_passwd.pw_uid,
- &pw_passwd.pw_gid, comment, gecos,
- dir, shell);
+ sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
+ logname, password, &pw_passwd.pw_uid,
+ &pw_passwd.pw_gid, comment, gecos,
+ dir, shell);
pw_passwd.pw_name = logname;
pw_passwd.pw_passwd = password;
pw_passwd.pw_comment = comment;
diff --git a/c/src/lib/libc/getgrent.c b/c/src/lib/libc/getgrent.c
index d0a92a0b80..b47ece8283 100644
--- a/c/src/lib/libc/getgrent.c
+++ b/c/src/lib/libc/getgrent.c
@@ -36,7 +36,7 @@ int getgrnam_r(
while (fgets (buffer, bufsize, fp)) {
sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, &grp->gr_gid,
+ groupname, password, (int *) &grp->gr_gid,
groups);
grp->gr_name = groupname;
grp->gr_passwd = password;
@@ -83,7 +83,7 @@ int getgrgid_r(
while (fgets (buffer, bufsize, fp)) {
sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, &gr_group.gr_gid,
+ groupname, password, (int *) &gr_group.gr_gid,
groups);
gr_group.gr_name = groupname;
gr_group.gr_passwd = password;
@@ -125,7 +125,7 @@ struct group *getgrent( void )
return NULL;
sscanf (buf, "%[^:]:%[^:]:%d:%s\n",
- groupname, password, &gr_group.gr_gid,
+ groupname, password, (int *) &gr_group.gr_gid,
groups);
gr_group.gr_name = groupname;
gr_group.gr_passwd = password;
diff --git a/c/src/lib/libc/getpwent.c b/c/src/lib/libc/getpwent.c
index daa5d226f1..5a9b0f96c6 100644
--- a/c/src/lib/libc/getpwent.c
+++ b/c/src/lib/libc/getpwent.c
@@ -33,7 +33,7 @@ int getpwnam_r(
}
while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
+ sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
logname, password, &pwd->pw_uid,
&pwd->pw_gid, comment, gecos,
dir, shell);
@@ -84,7 +84,7 @@ int getpwuid_r(
}
while (fgets (buffer, bufsize, fp)) {
- sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
+ sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
logname, password, &pw_passwd.pw_uid,
&pw_passwd.pw_gid, comment, gecos,
dir, shell);
@@ -129,10 +129,10 @@ struct passwd *getpwent()
if (fgets (buf, sizeof (buf), passwd_fp) == NULL)
return NULL;
- sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
- logname, password, &pw_passwd.pw_uid,
- &pw_passwd.pw_gid, comment, gecos,
- dir, shell);
+ sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
+ logname, password, &pw_passwd.pw_uid,
+ &pw_passwd.pw_gid, comment, gecos,
+ dir, shell);
pw_passwd.pw_name = logname;
pw_passwd.pw_passwd = password;
pw_passwd.pw_comment = comment;