RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Pinto Elia
  Root:   /v/rpm/cvs                       Email:  devzero2...@rpm5.org
  Module: popt                             Date:   08-Jan-2014 12:16:15
  Branch: HEAD                             Handle: 2014010811161401

  Modified files:
    popt                    CHANGES popthelp.c

  Log:
    popthelp.c reduce variables scope (cppcheck warning)

  Summary:
    Revision    Changes     Path
    1.193       +1  -0      popt/CHANGES
    1.107       +2  -2      popt/popthelp.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: popt/CHANGES
  ============================================================================
  $ cvs diff -u -r1.192 -r1.193 CHANGES
  --- popt/CHANGES      8 Jan 2014 09:38:16 -0000       1.192
  +++ popt/CHANGES      8 Jan 2014 11:16:14 -0000       1.193
  @@ -1,4 +1,5 @@
   1.17 -> 2.0:
  +    - devzero2000: popthelp.c reduce variables scope (cppcheck warning)
       - devzero2000: poptint.c reduce variables scope (cppcheck warning)
       - devzero2000: poptconfig.c reduce variables scope (cppcheck warning)
       - devzero2000: add cppcheck conditional makefile target
  @@ .
  patch -p0 <<'@@ .'
  Index: popt/popthelp.c
  ============================================================================
  $ cvs diff -u -r1.106 -r1.107 popthelp.c
  --- popt/popthelp.c   5 Sep 2011 13:20:54 -0000       1.106
  +++ popt/popthelp.c   8 Jan 2014 11:16:15 -0000       1.107
  @@ -536,7 +536,6 @@
        /*@*/
   {
       size_t max = 0;
  -    const char * argDescrip;
   
       if (opt != NULL)
       while (opt->longName || opt->shortName || opt->arg) {
  @@ -547,6 +546,7 @@
            if (len > max) max = len;
        } else if (!F_ISSET(opt, DOC_HIDDEN)) {
            len = sizeof("  ")-1;
  +         const char * argDescrip;
            /* XXX --long always padded for alignment with/without "-X, ". */
            len += sizeof("-X, ")-1;
            if (opt->longName) {
  @@ -618,7 +618,6 @@
        /*@modifies fp, columns->cur, fileSystem @*/
   {
       const struct poptOption * opt;
  -    const char *sub_transdom;
   
       if (table == poptAliasOptions) {
        itemHelp(fp, con->aliases, con->numAliases, columns, NULL);
  @@ -634,6 +633,7 @@
   
       if (table != NULL)
       for (opt = table; opt->longName || opt->shortName || opt->arg; opt++) {
  +     const char *sub_transdom;
        if (poptArgType(opt) != POPT_ARG_INCLUDE_TABLE)
            continue;
        sub_transdom = getTableTranslationDomain(opt->arg);
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to