This patch fixes any warning reported by gcc 4.3.4 (I haven't yet tried
   with newer versions).  All of them are trivial changes but given the
   patch size, I think it is better to postpone it after the release.

   Any comment?

I say push it.  We will have to fix any bugs that might arise anyway.

   diff --git a/ChangeLog b/ChangeLog
   index cd986cf..c3f004a 100644
   --- a/ChangeLog
   +++ b/ChangeLog
   @@ -1,3 +1,127 @@
   +2009-12-03  Giuseppe Scrivano  <[email protected]>
   +
   +    * ftp/cmds.c (domap): Add braces around the else branch.
   +    (strup): Remove.

Please mention if strup is a function, or variable.

   diff --git a/ftpd/ftpcmd.y b/ftpd/ftpcmd.y
   index e52ff61..84be120 100644
   --- a/ftpd/ftpcmd.y
   +++ b/ftpd/ftpcmd.y
   @@ -995,7 +995,7 @@ yylex()
                                           /* NOTREACHED */
                                   }
                                   state = p->state;
   -                            yylval.s = p->name;
   +                            yylval.s = (char*)p->name;

Space between cast and variable, same thing in some other places.

   diff --git a/libinetutils/utmp_logout.c b/libinetutils/utmp_logout.c
   index e055b0b..54947c1 100644
   --- a/libinetutils/utmp_logout.c
   +++ b/libinetutils/utmp_logout.c
   @@ -89,7 +89,7 @@ utmp_logout (char *line)

      strncpy (utx.ut_line, line, sizeof (utx.ut_line));

   -  if (ut = getutline (&utx))
   +  if ((ut = getutline (&utx)))
        {

Better to move the assignment outside the if statement, i.e.

ut = getutline (&utx);
if (ut)
...

A few other places use the assignment in if statment variant, those
should be fixed as well.  You don't need to fix all the existing
cases, but atleast the ones you touched in this patch where you add
extra parens...  Unless you want to :-)


Reply via email to