Point out that the file_struct in log_delete is zero-initialized because
[rsync/rsync.git] / popt / popthelp.c
index 7056054..6a00976 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "system.h"
 
-#define        POPT_WCHAR_HACK
+/*#define POPT_WCHAR_HACK*/
 #ifdef         POPT_WCHAR_HACK
 #include <wchar.h>                     /* for mbsrtowcs */
 /*@access mbstate_t @*/
@@ -121,7 +121,7 @@ getArgDescrip(const struct poptOption * opt,
     if (opt->argDescrip) return D_(translation_domain, opt->argDescrip);
 
     switch (opt->argInfo & POPT_ARG_MASK) {
-    case POPT_ARG_NONE:                return POPT_("NONE");
+    /*case POPT_ARG_NONE:      return POPT_("NONE");*/ /* impossible */
 #ifdef DYING
     case POPT_ARG_VAL:         return POPT_("VAL");
 #else
@@ -360,7 +360,7 @@ static void singleOptionHelp(FILE * fp, size_t maxLeftCol,
 /*@=boundswrite@*/
 
     if (help)
-       fprintf(fp,"  %-*s   ", maxLeftCol+displaypad, left);
+       fprintf(fp,"  %-*s   ", (int)maxLeftCol+displaypad, left);
     else {
        fprintf(fp,"  %s\n", left); 
        goto out;
@@ -767,6 +767,9 @@ static int showShortOptions(const struct poptOption * opt, FILE * fp,
     char * s = (str != NULL ? str : memset(alloca(300), 0, 300));
     int len = 0;
 
+    if (s == NULL)
+       return 0;
+
 /*@-boundswrite@*/
     if (opt != NULL)
     for (; (opt->longName || opt->shortName || opt->arg); opt++) {