The number of elements in a hash table cannot be negative.
Let the return type of VG_(HT_count_nodes) reflect that.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15490 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_deduppoolalloc.c b/coregrind/m_deduppoolalloc.c
index 51a58cb..d562cc7 100644
--- a/coregrind/m_deduppoolalloc.c
+++ b/coregrind/m_deduppoolalloc.c
@@ -201,7 +201,7 @@
 static void print_stats (DedupPoolAlloc *ddpa)
 {
    VG_(message)(Vg_DebugMsg,
-                "dedupPA:%s %ld allocs (%d uniq)"
+                "dedupPA:%s %ld allocs (%u uniq)"
                 " %ld pools (%ld bytes free in last pool)\n",
                 ddpa->cc,
                 (long int) ddpa->nr_alloc_calls,
diff --git a/coregrind/m_gdbserver/m_gdbserver.c b/coregrind/m_gdbserver/m_gdbserver.c
index fba0a2b..87b5b45 100644
--- a/coregrind/m_gdbserver/m_gdbserver.c
+++ b/coregrind/m_gdbserver/m_gdbserver.c
@@ -542,7 +542,7 @@
    int i;
 
    dlog(1,
-        "clear_gdbserved_addresses: scanning hash table nodes %d\n", 
+        "clear_gdbserved_addresses: scanning hash table nodes %u\n", 
         VG_(HT_count_nodes) (gs_addresses));
    ag = (GS_Address**) VG_(HT_to_array) (gs_addresses, &n_elems);
    for (i = 0; i < n_elems; i++)
diff --git a/coregrind/m_hashtable.c b/coregrind/m_hashtable.c
index bebcaab..32219c9 100644
--- a/coregrind/m_hashtable.c
+++ b/coregrind/m_hashtable.c
@@ -82,7 +82,7 @@
    return table;
 }
 
-Int VG_(HT_count_nodes) ( const VgHashTable *table )
+UInt VG_(HT_count_nodes) ( const VgHashTable *table )
 {
    return table->n_elements;
 }
diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c
index 76650c0..10a0e4b 100644
--- a/helgrind/hg_main.c
+++ b/helgrind/hg_main.c
@@ -5653,7 +5653,7 @@
                HG_(stats__LockN_to_P_queries),
                HG_(stats__LockN_to_P_get_map_size)() );
 
-   VG_(printf)("client malloc-ed blocks: %'8d\n",
+   VG_(printf)("client malloc-ed blocks: %'8u\n",
                VG_(HT_count_nodes)(hg_mallocmeta_table));
                
    VG_(printf)("string table map: %'8llu queries (%llu map size)\n",
diff --git a/include/pub_tool_hashtable.h b/include/pub_tool_hashtable.h
index 6fc6822..17060ec 100644
--- a/include/pub_tool_hashtable.h
+++ b/include/pub_tool_hashtable.h
@@ -58,7 +58,7 @@
 extern VgHashTable *VG_(HT_construct) ( const HChar* name );
 
 /* Count the number of nodes in a table. */
-extern Int VG_(HT_count_nodes) ( const VgHashTable *table );
+extern UInt VG_(HT_count_nodes) ( const VgHashTable *table );
 
 /* Add a node to the table.  Duplicate keys are permitted. */
 extern void VG_(HT_add_node) ( VgHashTable *t, void* node );