0001-Specify-printf-formats.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From b08e61ef64eece23ce8ffa2784cd3c4f70b6169e Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Sat, 17 Jun 2017 08:08:56 -0700
  4. Subject: [PATCH] Specify printf formats
  5. Fixes
  6. tiotest.c:555:4: error: format not a string literal and no format arguments [-Werror=format-security]
  7. Upstream-Status: Pending
  8. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  9. ---
  10. tiotest.c | 6 +++---
  11. 1 file changed, 3 insertions(+), 3 deletions(-)
  12. diff --git a/tiotest.c b/tiotest.c
  13. index 6b3d0c3..3e6166a 100644
  14. --- a/tiotest.c
  15. +++ b/tiotest.c
  16. @@ -91,7 +91,7 @@ inline void checkIntZero(int value, char *mess)
  17. {
  18. if (value <= 0)
  19. {
  20. - printf(mess);
  21. + printf("%s",mess);
  22. printf("Try 'tiotest -h' for more information.\n");
  23. exit(1);
  24. }
  25. @@ -101,7 +101,7 @@ inline void checkLong(long value, char *mess)
  26. {
  27. if (value < 0)
  28. {
  29. - printf(mess);
  30. + printf("%s", mess);
  31. printf("Try 'tiotest -h' for more information\n");
  32. exit(1);
  33. }
  34. @@ -552,7 +552,7 @@ void do_test( ThreadTest *test, int testCase, int sequential,
  35. if(args.debugLevel > 4)
  36. {
  37. printf("Created %d threads\n", i);
  38. - fprintf(stderr, debugMessage);
  39. + fprintf(stderr, "%s", debugMessage);
  40. fflush(stderr);
  41. }
  42. --
  43. 2.13.1