bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] quoteargs: fix comparison between signed and unsigned warning


From: Sami Kerola
Subject: [PATCH] quoteargs: fix comparison between signed and unsigned warning
Date: Thu, 19 Oct 2017 20:42:07 +0100

* quotearg.c: Avoid signed/unsigned comparison warning
---
 lib/quotearg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/quotearg.c b/lib/quotearg.c
index df602698e..1c90df301 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -888,7 +888,7 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
     {
       bool preallocated = (sv == &slotvec0);
 
-      if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= n)
+      if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= (size_t) 
n)
         xalloc_die ();
 
       slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv);
-- 
2.14.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]