Avoid gcc warnings.
[gnulib.git] / tests / test-dirname.c
index 20279d2..4114b77 100644 (file)
@@ -1,5 +1,5 @@
 /* Test the gnulib dirname module.
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "strdup.h"
-
 const char *program_name = "test-dirname";
 
 struct test {
@@ -156,8 +154,9 @@ main ()
                 || (dirlen + 1 == strlen (dir) && dir[dirlen] == '.'))))
        {
          ok = false;
-         printf ("dir_name `%s': got `%s' len %d, expected `%s' len %d\n",
-                 t->name, dir, dirlen, t->dir, strlen (t->dir));
+         printf ("dir_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+                 t->name, dir, dirlen,
+                 t->dir, (unsigned long) strlen (t->dir));
        }
       if (strcmp (last, t->last))
        {
@@ -171,8 +170,9 @@ main ()
                     && ISSLASH (base[baselen])))))
        {
          ok = false;
-         printf ("base_name `%s': got `%s' len %d, expected `%s' len %d\n",
-                 t->name, base, baselen, t->base, strlen (t->base));
+         printf ("base_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+                 t->name, base, baselen,
+                 t->base, (unsigned long) strlen (t->base));
        }
       if (strcmp (stripped, t->stripped) || modified != t->modified)
        {