gd-2.2.3-tests.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 2b3dd57a6ccb2940f2e9119ae04e14362e2a1f61 Mon Sep 17 00:00:00 2001
  2. From: Remi Collet <fedora@famillecollet.com>
  3. Date: Fri, 22 Jul 2016 08:14:12 +0200
  4. Subject: [PATCH] Fix gd2/gd2_read.c:8:6: error: 'error' may be used
  5. uninitialized in this function [-Werror=maybe-uninitialized]
  6. Also report about any error, not only the last one.
  7. ---
  8. tests/gd2/gd2_read.c | 6 +-----
  9. 1 file changed, 1 insertion(+), 5 deletions(-)
  10. diff --git a/tests/gd2/gd2_read.c b/tests/gd2/gd2_read.c
  11. index 94fe069..8ce8bd1 100644
  12. --- a/tests/gd2/gd2_read.c
  13. +++ b/tests/gd2/gd2_read.c
  14. @@ -5,7 +5,7 @@
  15. int main(int argc, char *argv[])
  16. {
  17. - int error, i = 0;
  18. + int error = 0, i = 0;
  19. gdImagePtr im, exp;
  20. FILE *fp;
  21. char *path[] = {
  22. @@ -40,8 +40,6 @@ int main(int argc, char *argv[])
  23. gdTestErrorMsg("image %s differs from expected result\n", path[i]);
  24. gdImageDestroy(im);
  25. error = 1;
  26. - } else {
  27. - error = 0;
  28. }
  29. if (exp) {
  30. gdImageDestroy(exp);
  31. @@ -52,8 +50,6 @@ int main(int argc, char *argv[])
  32. gdTestErrorMsg("image %s should have failed to be loaded\n", path[i]);
  33. gdImageDestroy(im);
  34. error = 1;
  35. - } else {
  36. - error = 0;
  37. }
  38. }
  39. i++;