[ovs-dev] [PATCH v2 02/19] process: Avoid warnings compiling process.c

Bhanuprakash Bodireddy bhanuprakash.bodireddy at intel.com
Fri Jul 21 07:23:53 UTC 2017


This commit fixes the following "sparse" warning:

lib/process.c:439:16: error: use of assignment suppression and length
modifier together in gnu_scanf format [-Werror=format=].

This fix doesn't need any other changes as the fields aren't used for now.

Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy at intel.com>
---
 lib/process.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/lib/process.c b/lib/process.c
index 3e119b5..0b8d195 100644
--- a/lib/process.c
+++ b/lib/process.c
@@ -444,24 +444,24 @@ get_raw_process_info(pid_t pid, struct raw_process_info *raw)
                "%llu "          /* 22. start_time */
                "%llu "          /* 23. vsize */
                "%llu "          /* 24. rss */
+               "%*u "           /* (25. rsslim) */
+               "%*u "           /* (26. start_code) */
+               "%*u "           /* (27. end_code) */
+               "%*u "           /* (28. start_stack) */
+               "%*u "           /* (29. esp) */
+               "%*u "           /* (30. eip) */
+               "%*u "           /* (31. pending signals) */
+               "%*u "           /* (32. blocked signals) */
+               "%*u "           /* (33. ignored signals) */
+               "%*u "           /* (34. caught signals) */
+               "%*u "           /* (35. whcan) */
+               "%*u "           /* (36. always 0) */
+               "%*u "           /* (37. always 0) */
+               "%*d "           /* (38. exit_signal) */
+               "%*d "           /* (39. task_cpu) */
 #if 0
                /* These are here for documentation but #if'd out to save
                 * actually parsing them from the stream for no benefit. */
-               "%*lu "          /* (25. rsslim) */
-               "%*lu "          /* (26. start_code) */
-               "%*lu "          /* (27. end_code) */
-               "%*lu "          /* (28. start_stack) */
-               "%*lu "          /* (29. esp) */
-               "%*lu "          /* (30. eip) */
-               "%*lu "          /* (31. pending signals) */
-               "%*lu "          /* (32. blocked signals) */
-               "%*lu "          /* (33. ignored signals) */
-               "%*lu "          /* (34. caught signals) */
-               "%*lu "          /* (35. whcan) */
-               "%*lu "          /* (36. always 0) */
-               "%*lu "          /* (37. always 0) */
-               "%*d "           /* (38. exit_signal) */
-               "%*d "           /* (39. task_cpu) */
                "%*u "           /* (40. rt_priority) */
                "%*u "           /* (41. policy) */
                "%*llu "         /* (42. blkio_ticks) */
-- 
2.4.11



More information about the dev mailing list