Fix warnings.
authorEmil Mikulic <emikulic@gmail.com>
Sat, 4 Jun 2011 12:40:35 +0000 (22:40 +1000)
committerEmil Mikulic <emikulic@gmail.com>
Sat, 4 Jun 2011 14:07:06 +0000 (00:07 +1000)
html.c
html.h

diff --git a/html.c b/html.c
index 0bdd384..3524340 100644 (file)
--- a/html.c
+++ b/html.c
@@ -22,11 +22,12 @@ static const char *relpaths[] = {
     "../.."
 };
 
-void html_open(struct str *buf, const char *title, const int path_depth,
-    const int want_graph_js)
+void html_open(struct str *buf, const char *title,
+    const unsigned int path_depth, const int want_graph_js)
 {
-    assert(path_depth < (sizeof(relpaths)/sizeof(char *)));
-    const char *root = relpaths[path_depth];
+    const char *root;
+    assert(path_depth < (sizeof(relpaths)/sizeof(*relpaths)));
+    root = relpaths[path_depth];
 
     str_appendf(buf,
         "<!DOCTYPE html>\n"
diff --git a/html.h b/html.h
index 736d81e..b024cc5 100644 (file)
--- a/html.h
+++ b/html.h
@@ -7,8 +7,8 @@
 
 struct str;
 
-void html_open(struct str *buf, const char *title, const int path_depth,
-    const int want_graph_js);
+void html_open(struct str *buf, const char *title,
+   const unsigned int path_depth, const int want_graph_js);
 void html_close(struct str *buf);
 
 /* vim:set ts=3 sw=3 tw=78 expandtab: */