about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--iconv/iconvconfig.c2
-rw-r--r--locale/programs/ld-collate.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ba9b6151ed..f0ebd06b36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-03-05  Gabriel F. T. Gomes  <gabriel@inconstante.eti.br>
+
+	[BZ #24372]
+	* iconv/iconvconfig.c (write_output): Add parentheses to get rid
+	of compiler warning.
+	* locale/programs/ld-collate.c (collate_output): Likewise.
+
 2019-03-21  DJ Delorie  <dj@redhat.com>
 
 	[BZ #24372]
diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c
index 1e6066cdf0..f75e46dc16 100644
--- a/iconv/iconvconfig.c
+++ b/iconv/iconvconfig.c
@@ -1081,7 +1081,7 @@ write_output (void)
      Creating a perfect hash table is not reasonable here.  Therefore
      we use open hashing and a table size which is the next prime 50%
      larger than the number of strings.  */
-  hash_size = next_prime (nnames + nnames >> 1);
+  hash_size = next_prime (nnames + (nnames >> 1));
   hash_table = (struct hash_entry *) xcalloc (hash_size,
 					      sizeof (struct hash_entry));
   /* Fill the hash table.  */
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 19b23c2453..6baab6cfb0 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -2402,7 +2402,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
       runp = runp->next;
     }
   /* Add 50% and find the next prime number.  */
-  elem_size = next_prime (elem_size + elem_size >> 1);
+  elem_size = next_prime (elem_size + (elem_size >> 1));
 
   /* Allocate the table.  Each entry consists of two words: the hash
      value and an index in a secondary table which provides the index