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

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   30-Jun-2016 15:20:04
  Branch: rpm-5_4                          Handle: 2016063013200400

  Modified files:           (Branch: rpm-5_4)
    rpm/rpmio               getdate.y

  Log:
    - getdate: rpmutil.h -> rpmdefs.h, remove splint annotations.

  Summary:
    Revision    Changes     Path
    2.2.8.3     +5  -50     rpm/rpmio/getdate.y
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/getdate.y
  ============================================================================
  $ cvs diff -u -r2.2.8.2 -r2.2.8.3 getdate.y
  --- rpm/rpmio/getdate.y       24 Sep 2014 13:03:03 -0000      2.2.8.2
  +++ rpm/rpmio/getdate.y       30 Jun 2016 13:20:04 -0000      2.2.8.3
  @@ -72,9 +72,9 @@
   */
   struct timeb {
       time_t           time;           /* Seconds since the epoch      */
  -/*@unused@*/ unsigned short millitm; /* Field not used               */
  +    unsigned short millitm;          /* Field not used               */
       short            timezone;       /* Minutes west of GMT          */
  -/*@unused@*/ short   dstflag;        /* Field not used               */
  +    short    dstflag;                /* Field not used               */
   };
   #endif /* defined(HAVE_SYS_TIMEB_H) */
   
  @@ -95,7 +95,7 @@
   #include <stdlib.h>
   #endif
   
  -#include <rpmutil.h>
  +#include <rpmdefs.h>
   
   /* NOTES on rebuilding getdate.c (particularly for inclusion in CVS
      releases):
  @@ -123,7 +123,6 @@
   **  An entry in the lexical lookup table.
   */
   typedef struct _TABLE {
  -/*@observer@*/ /*@relnull@*/
       char     *name;
       int              type;
       time_t   value;
  @@ -151,43 +150,24 @@
   **  yacc had the %union construct.)  Maybe someday; right now we only use
   **  the %union very rarely.
   */
  -/*@unchecked@*/
   static char  *yyInput;
  -/*@unchecked@*/
   static DSTMODE       yyDSTmode;
  -/*@unchecked@*/
   static time_t        yyDayOrdinal;
  -/*@unchecked@*/
   static time_t        yyDayNumber;
  -/*@unchecked@*/
   static int   yyHaveDate;
  -/*@unchecked@*/
   static int   yyHaveDay;
  -/*@unchecked@*/
   static int   yyHaveRel;
  -/*@unchecked@*/
   static int   yyHaveTime;
  -/*@unchecked@*/
   static int   yyHaveZone;
  -/*@unchecked@*/
   static time_t        yyTimezone;
  -/*@unchecked@*/
   static time_t        yyDay;
  -/*@unchecked@*/
   static time_t        yyHour;
  -/*@unchecked@*/
   static time_t        yyMinutes;
  -/*@unchecked@*/
   static time_t        yyMonth;
  -/*@unchecked@*/
   static time_t        yySeconds;
  -/*@unchecked@*/
   static time_t        yyYear;
  -/*@unchecked@*/
   static MERIDIAN      yyMeridian;
  -/*@unchecked@*/
   static time_t        yyRelMonth;
  -/*@unchecked@*/
   static time_t        yyRelSeconds;
   
   #define yyparse getdate_yyparse
  @@ -196,12 +176,9 @@
   
   static int yyparse (void);
   static int yylex (void);
  -static int yyerror(const char * s)
  -     /*@*/;
  +static int yyerror(const char * s);
   
  -/*@-exportheader@*/
   extern time_t get_date(char * p, struct timeb * now);
  -/*@=exportheader@*/
   
   %}
   
  @@ -426,7 +403,6 @@
   %%
   
   /* Month and day table. */
  -/*@unchecked@*/ /*@observer@*/
   static TABLE const MonthDayTable[] = {
       { "january",     tMONTH,  1 },
       { "february",    tMONTH,  2 },
  @@ -456,7 +432,6 @@
   };
   
   /* Time units table. */
  -/*@unchecked@*/ /*@observer@*/
   static TABLE const UnitsTable[] = {
       { "year",                tMONTH_UNIT,    12 },
       { "month",               tMONTH_UNIT,    1 },
  @@ -472,7 +447,6 @@
   };
   
   /* Assorted relative-time words. */
  -/*@unchecked@*/ /*@observer@*/
   static TABLE const OtherTable[] = {
       { "tomorrow",    tMINUTE_UNIT,   1 * 24 * 60 },
       { "yesterday",   tMINUTE_UNIT,   -1 * 24 * 60 },
  @@ -499,7 +473,6 @@
   
   /* The timezone table. */
   /* Some of these are commented out because a time_t can't store a float. */
  -/*@unchecked@*/ /*@observer@*/
   static TABLE const TimezoneTable[] = {
       { "gmt", tZONE,     HOUR( 0) },  /* Greenwich Mean */
       { "ut",  tZONE,     HOUR( 0) },  /* Universal (Coordinated) */
  @@ -584,7 +557,6 @@
   };
   
   /* Military timezone table. */
  -/*@unchecked@*/ /*@observer@*/
   static TABLE const MilitaryTable[] = {
       { "a",   tZONE,  HOUR(  1) },
       { "b",   tZONE,  HOUR(  2) },
  @@ -619,7 +591,7 @@
   
   /* ARGSUSED */
   static int
  -yyerror(/*@unused@*/ const char * s)
  +yyerror(const char * s)
   {
     (void)s;   /* XXX keep gcc/clang happy */
     return 0;
  @@ -629,7 +601,6 @@
   RPM_GNUC_PURE
   static time_t
   ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian)
  -     /*@*/
   {
       if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59)
        return -1;
  @@ -665,7 +636,6 @@
   Convert(time_t Month, time_t Day, time_t Year,
        time_t Hours, time_t Minutes, time_t Seconds,
        MERIDIAN Meridian, DSTMODE DSTmode)
  -     /*@*/
   {
       static int DaysInMonth[12] = {
        31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
  @@ -708,7 +678,6 @@
   
   static time_t
   DSTcorrect(time_t Start, time_t Future)
  -     /*@*/
   {
       time_t   StartDay;
       time_t   FutureDay;
  @@ -721,7 +690,6 @@
   
   static time_t
   RelativeDate(time_t Start, time_t DayOrdinal, time_t DayNumber)
  -     /*@*/
   {
       struct tm        *tm;
       time_t   now;
  @@ -736,7 +704,6 @@
   
   static time_t
   RelativeMonth(time_t Start, time_t RelMonth)
  -     /*@*/
   {
       struct tm        *tm;
       time_t   Month;
  @@ -757,8 +724,6 @@
   
   static int
   LookupWord(char * buff)
  -     /*@globals yylval @*/
  -     /*@modifies *buff, yylval @*/
   {
       register char    *p;
       register char    *q;
  @@ -863,11 +828,8 @@
   }
   
   
  -/*@-incondefs@*/
   static int
   yylex(void)
  -     /*@globals yyInput, yylval @*/
  -     /*@modifies yyInput, yylval @*/
   {
       register char    c;
       register char    *p;
  @@ -916,17 +878,14 @@
                Count--;
        } while (Count > 0);
       }
  -    /*@notreached@*/
       return 0;
   }
  -/*@=incondefs@*/
   
   #define TM_YEAR_ORIGIN 1900
   
   /* Yield A - B, measured in seconds.  */
   static long
   difftm (const struct tm * a, const struct tm * b)
  -     /*@*/
   {
     unsigned ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
     unsigned by = b->tm_year + (TM_YEAR_ORIGIN - 1);
  @@ -976,9 +935,7 @@
            return -1;
   
        if (gmt_ptr != NULL)
  -         /*@-observertrans -dependenttrans@*/
            ftz.timezone = difftm (&gmt, tm) / 60;
  -         /*@=observertrans =dependenttrans@*/
        else
            /* We are on a system like VMS, where the system clock is
               in local time and the system has no concept of timezones.
  @@ -1013,11 +970,9 @@
       yyHaveTime = 0;
       yyHaveZone = 0;
   
  -    /*@-unrecog@*/
       if (yyparse()
        || yyHaveTime > 1 || yyHaveZone > 1 || yyHaveDate > 1 || yyHaveDay > 1)
        return -1;
  -    /*@=unrecog@*/
   
       if (yyHaveDate || yyHaveTime || yyHaveDay) {
        Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to