diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2014-10-13 11:19:33 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2014-10-13 11:20:30 +0300 |
commit | 647ff9bcec7ff573b78be0aa4f2c7cb53960cb72 (patch) | |
tree | 70e1f9b4220c23ff1a06c5dba50890add6b3bc99 | |
parent | 43f2653b7a55966961db06d58e926db749ca4654 (diff) | |
download | ConsoleKit2-647ff9bcec7ff573b78be0aa4f2c7cb53960cb72.tar.gz |
Fix gcc warning
warning: use of assignment suppression and length modifier
together in gnu_scanf format. Additionally added comments
next to each of the sscanf variables because there's a lot
of them to keep track of.
-rw-r--r-- | src/ck-sysdeps-linux.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ck-sysdeps-linux.c b/src/ck-sysdeps-linux.c index 153f784..e739778 100644 --- a/src/ck-sysdeps-linux.c +++ b/src/ck-sysdeps-linux.c @@ -363,21 +363,21 @@ stat2proc (const char *S, S = tmp + 2; /* skip ") " */ num = sscanf (S, - "%c " - "%d %d %d %d %d " - "%lu %lu %lu %lu %lu " + "%c " /* state */ + "%d %d %d %d %d " /* ppid pgrp session tty tpgid */ + "%lu %lu %lu %lu %lu " /* flags min_flt cmin_flt maj_flt cmaj_flt */ "%Lu %Lu %Lu %Lu " /* utime stime cutime cstime */ - "%ld %ld " - "%d " - "%ld " + "%ld %ld " /* priority nice*/ + "%d " /* nlwp */ + "%ld " /* alarm */ "%Lu " /* start_time */ - "%lu " - "%ld " - "%lu %"KLF"u %"KLF"u %"KLF"u %"KLF"u %"KLF"u " + "%lu " /* vsize */ + "%ld " /* rss */ + "%lu %"KLF"u %"KLF"u %"KLF"u %"KLF"u %"KLF"u " /* rss_rlim start_code end_code start_stack kstk_esp kstk_eip */ "%*s %*s %*s %*s " /* discard, no RT signals & Linux 2.1 used hex */ - "%"KLF"u %*lu %*lu " - "%d %d " - "%lu %lu", + "%"KLF"u %*u %*u " /* wchan */ + "%d %d " /* exit_signal processor */ + "%lu %lu", /* rtprio sched */ &P->state, &P->ppid, &P->pgrp, &P->session, &P->tty, &P->tpgid, &P->flags, &P->min_flt, &P->cmin_flt, &P->maj_flt, &P->cmaj_flt, |