]> git.ozlabs.org Git - ccan/blobdiff - ccan/htable/_info
Makefile-web: make it usable with "make -f Makefile-web".
[ccan] / ccan / htable / _info
index 1553da2b0e85e7df8378da6e6e4cf2f9b8464dd8..a3bb76db6bf0395562bfbc96c02e0f9e98e04391 100644 (file)
@@ -1,3 +1,4 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 
@@ -35,6 +36,7 @@
  *     // Wrapper for rehash function pointer.
  *     static size_t rehash(const void *e, void *unused)
  *     {
+ *             (void)unused;
  *             return hash_string(((struct name_to_digit *)e)->name);
  *     }
  *
@@ -63,7 +65,7 @@
  *     int main(int argc, char *argv[])
  *     {
  *             struct htable ht;
- *             unsigned int i;
+ *             int i;
  *             unsigned long val;
  *
  *             if (argc < 2)
@@ -72,7 +74,7 @@
  *
  *             // Create and populate hash table.
  *             htable_init(&ht, rehash, NULL);
- *             for (i = 0; i < sizeof(map)/sizeof(map[0]); i++)
+ *             for (i = 0; i < (int)(sizeof(map)/sizeof(map[0])); i++)
  *                     htable_add(&ht, hash_string(map[i].name), &map[i]);
  *
  *             // Add any aliases to the hash table.