08_Fix-signature-of-multiplyCheckOverflow.-It-returns-a-b.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From: Antonio Larrosa <larrosa@kde.org>
  2. Date: Fri, 10 Mar 2017 15:40:02 +0100
  3. Subject: Fix signature of multiplyCheckOverflow. It returns a bool, not an int
  4. ---
  5. libaudiofile/modules/MSADPCM.cpp | 2 +-
  6. sfcommands/sfconvert.c | 2 +-
  7. 2 files changed, 2 insertions(+), 2 deletions(-)
  8. diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp
  9. index ef9c38c..d8c9553 100644
  10. --- a/libaudiofile/modules/MSADPCM.cpp
  11. +++ b/libaudiofile/modules/MSADPCM.cpp
  12. @@ -116,7 +116,7 @@ int firstBitSet(int x)
  13. #define __has_builtin(x) 0
  14. #endif
  15. -int multiplyCheckOverflow(int a, int b, int *result)
  16. +bool multiplyCheckOverflow(int a, int b, int *result)
  17. {
  18. #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow))
  19. return __builtin_mul_overflow(a, b, result);
  20. diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c
  21. index 970a3e4..367f7a5 100644
  22. --- a/sfcommands/sfconvert.c
  23. +++ b/sfcommands/sfconvert.c
  24. @@ -60,7 +60,7 @@ int firstBitSet(int x)
  25. #define __has_builtin(x) 0
  26. #endif
  27. -int multiplyCheckOverflow(int a, int b, int *result)
  28. +bool multiplyCheckOverflow(int a, int b, int *result)
  29. {
  30. #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow))
  31. return __builtin_mul_overflow(a, b, result);