Changeset c51917f in rtems


Ignore:
Timestamp:
Jul 2, 1999, 6:09:03 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
a0a225f
Parents:
c3d20eb
Message:

Fixed format strings and warnings.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/getgrent.c

    rc3d20eb rc51917f  
    3737  while (fgets (buffer, bufsize, fp)) {
    3838    sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
    39       groupname, password, &grp->gr_gid,
     39      groupname, password, (int *) &grp->gr_gid,
    4040      groups);
    4141    grp->gr_name = groupname;
     
    8484  while (fgets (buffer, bufsize, fp)) {
    8585    sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
    86       groupname, password, &gr_group.gr_gid,
     86      groupname, password, (int *) &gr_group.gr_gid,
    8787      groups);
    8888    gr_group.gr_name = groupname;
     
    126126
    127127  sscanf (buf, "%[^:]:%[^:]:%d:%s\n",
    128     groupname, password, &gr_group.gr_gid,
     128    groupname, password, (int *) &gr_group.gr_gid,
    129129    groups);
    130130  gr_group.gr_name = groupname;
  • c/src/exec/libcsupport/src/getpwent.c

    rc3d20eb rc51917f  
    3434
    3535  while (fgets (buffer, bufsize, fp)) {
    36     sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
     36    sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
    3737        logname, password, &pwd->pw_uid,
    3838        &pwd->pw_gid, comment, gecos,
     
    8585
    8686  while (fgets (buffer, bufsize, fp)) {
    87     sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
     87    sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
    8888     logname, password, &pw_passwd.pw_uid,
    8989     &pw_passwd.pw_gid, comment, gecos,
     
    130130    return NULL;
    131131
    132   sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
    133           logname, password, &pw_passwd.pw_uid,
    134           &pw_passwd.pw_gid, comment, gecos,
    135           dir, shell);
     132  sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
     133    logname, password, &pw_passwd.pw_uid,
     134    &pw_passwd.pw_gid, comment, gecos,
     135    dir, shell);
    136136  pw_passwd.pw_name = logname;
    137137  pw_passwd.pw_passwd = password;
  • c/src/lib/libc/getgrent.c

    rc3d20eb rc51917f  
    3737  while (fgets (buffer, bufsize, fp)) {
    3838    sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
    39       groupname, password, &grp->gr_gid,
     39      groupname, password, (int *) &grp->gr_gid,
    4040      groups);
    4141    grp->gr_name = groupname;
     
    8484  while (fgets (buffer, bufsize, fp)) {
    8585    sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
    86       groupname, password, &gr_group.gr_gid,
     86      groupname, password, (int *) &gr_group.gr_gid,
    8787      groups);
    8888    gr_group.gr_name = groupname;
     
    126126
    127127  sscanf (buf, "%[^:]:%[^:]:%d:%s\n",
    128     groupname, password, &gr_group.gr_gid,
     128    groupname, password, (int *) &gr_group.gr_gid,
    129129    groups);
    130130  gr_group.gr_name = groupname;
  • c/src/lib/libc/getpwent.c

    rc3d20eb rc51917f  
    3434
    3535  while (fgets (buffer, bufsize, fp)) {
    36     sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
     36    sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
    3737        logname, password, &pwd->pw_uid,
    3838        &pwd->pw_gid, comment, gecos,
     
    8585
    8686  while (fgets (buffer, bufsize, fp)) {
    87     sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
     87    sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
    8888     logname, password, &pw_passwd.pw_uid,
    8989     &pw_passwd.pw_gid, comment, gecos,
     
    130130    return NULL;
    131131
    132   sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
    133           logname, password, &pw_passwd.pw_uid,
    134           &pw_passwd.pw_gid, comment, gecos,
    135           dir, shell);
     132  sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
     133    logname, password, &pw_passwd.pw_uid,
     134    &pw_passwd.pw_gid, comment, gecos,
     135    dir, shell);
    136136  pw_passwd.pw_name = logname;
    137137  pw_passwd.pw_passwd = password;
  • cpukit/libcsupport/src/getgrent.c

    rc3d20eb rc51917f  
    3737  while (fgets (buffer, bufsize, fp)) {
    3838    sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
    39       groupname, password, &grp->gr_gid,
     39      groupname, password, (int *) &grp->gr_gid,
    4040      groups);
    4141    grp->gr_name = groupname;
     
    8484  while (fgets (buffer, bufsize, fp)) {
    8585    sscanf (buffer, "%[^:]:%[^:]:%d:%s\n",
    86       groupname, password, &gr_group.gr_gid,
     86      groupname, password, (int *) &gr_group.gr_gid,
    8787      groups);
    8888    gr_group.gr_name = groupname;
     
    126126
    127127  sscanf (buf, "%[^:]:%[^:]:%d:%s\n",
    128     groupname, password, &gr_group.gr_gid,
     128    groupname, password, (int *) &gr_group.gr_gid,
    129129    groups);
    130130  gr_group.gr_name = groupname;
  • cpukit/libcsupport/src/getpwent.c

    rc3d20eb rc51917f  
    3434
    3535  while (fgets (buffer, bufsize, fp)) {
    36     sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
     36    sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
    3737        logname, password, &pwd->pw_uid,
    3838        &pwd->pw_gid, comment, gecos,
     
    8585
    8686  while (fgets (buffer, bufsize, fp)) {
    87     sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
     87    sscanf (buffer, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
    8888     logname, password, &pw_passwd.pw_uid,
    8989     &pw_passwd.pw_gid, comment, gecos,
     
    130130    return NULL;
    131131
    132   sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%s\n",
    133           logname, password, &pw_passwd.pw_uid,
    134           &pw_passwd.pw_gid, comment, gecos,
    135           dir, shell);
     132  sscanf (buf, "%[^:]:%[^:]:%d:%d:%[^:]:%[^:]:%[^:]:%s\n",
     133    logname, password, &pw_passwd.pw_uid,
     134    &pw_passwd.pw_gid, comment, gecos,
     135    dir, shell);
    136136  pw_passwd.pw_name = logname;
    137137  pw_passwd.pw_passwd = password;
Note: See TracChangeset for help on using the changeset viewer.