stuff
[oweals/gnunet.git] / src / util / getopt_helpers.c
index 3aea5d102af6455524c5cdab70e988a2b4c6cfc5..9821aca892ac0e79c43918da8a096e890cf6b675 100644 (file)
@@ -50,11 +50,11 @@ GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
                             const char *value)
 {
   const char *about = scls;
-  int slen;
-  int i;
+  size_t slen;
+  unsigned int i;
   int j;
-  int ml;
-  int p;
+  size_t ml;
+  size_t p;
   char *scp;
   const char *trans;
   const struct GNUNET_GETOPT_CommandLineOption *opt;
@@ -62,7 +62,6 @@ GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
   printf ("%s\n%s\n", ctx->binaryOptions, gettext (about));
   printf (_
           ("Arguments mandatory for long options are also mandatory for short options.\n"));
-  slen = 0;
   i = 0;
   opt = ctx->allOptions;
   while (opt[i].description != NULL)
@@ -85,10 +84,13 @@ GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
         }
       if (slen < BORDER)
         {
-          printf ("%*s", BORDER - slen, "");
+          printf ("%*s", (int) (BORDER - slen), "");
           slen = BORDER;
         }
-      trans = gettext (opt[i].description);
+      if (0 < strlen (opt[i].description))
+       trans = gettext (opt[i].description);
+      else
+       trans = "";
       ml = strlen (trans);
       p = 0;
     OUTER: