Changeset 587


Ignore:
Timestamp:
Oct 20, 2025, 10:42:43 PM (12 hours ago)
Author:
katerina
Message:

Fix for ticket #475 (compiler warnings about unused variables).

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_dbIO.c

    r579 r587  
    890890{
    891891  sh_file_t * p;
    892   int count = 0;
    893892  int errflag = 0;
    894893  char * line = SH_ALLOC(MAX_PATH_STORE+2);
     
    916915          else
    917916            sh_hash_remove_unconditional (p->fullpath);
    918           ++count;
    919917        }
    920918      else
     
    14811479                                    const char * outpath, int truncate)
    14821480{
    1483   static long p_count = 0;
    14841481  sh_filestore_t p;
    14851482  char *  fullpath = NULL;
     
    15591556    {
    15601557      write_record(pushdata_fd, &p, fullpath, linkpath, attr_string);
    1561       ++p_count;
    15621558    }
    15631559
  • trunk/src/sh_mem.c

    r579 r587  
    180180  memlist_t * merrlist = NULL;
    181181  memlist_t * merr;
    182   long        nerr = 0;
    183182
    184183  SL_ENTER(_("sh_mem_check"));
     
    205204          merr->next = merrlist;
    206205          merrlist   = merr;
    207           ++nerr;
    208206        }
    209207      else
     
    218216              merr->next = merrlist;
    219217              merrlist   = merr;
    220               ++nerr;
    221218            }
    222219          if ( this->real_address[SH_MEMMULT-1] != CHECKBYTE )
     
    229226              merr->next = merrlist;
    230227              merrlist   = merr;
    231               ++nerr;
    232228            }
    233229        }
  • trunk/src/sh_string.c

    r516 r587  
    644644              len = (size_t) tlen;
    645645
    646               if (tlen > 0 && r->siz > (r->len + len) &&
    647                   &(s->str[ovector[last]]) )
     646              if (tlen > 0 && r->siz > (r->len + len) /* && &(s->str[ovector[last]]) always true */ )
    648647                {
    649648                  memcpy(p, &(s->str[ovector[last]]), (size_t)len);
     
    676675            {
    677676              len = (size_t)tlen;
    678               if (r->siz >= (r->len + len) &&
    679                   &(s->str[ovector[2*i -1]]) ) {
     677              if (r->siz >= (r->len + len) /* && &(s->str[ovector[2*i -1]]) always true */ ) {
    680678                memcpy(p, &(s->str[ovector[2*i -1]]), (size_t)len);
    681679                p += (len - 1);
  • trunk/src/sh_tiger0.c

    r541 r587  
    134134
    135135  sh_byte * buffer = SH_ALLOC(PRIV_MAX + 72);
    136 
    137   unsigned long pages_read;
    138136  uid_t   euid;
    139137
     
    142140
    143141#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
     142  unsigned long pages_read;
    144143  /*@-nestedextern@*/
    145144  extern long IO_Limit;
     
    219218#endif
    220219
     220#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    221221    pages_read = 0;
     222#endif
    222223
    223224    while (1)
     
    228229          count = sl_read         (fd, buffer, PRIV_MAX);
    229230
     231#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    230232        ++pages_read;
     233#endif
    231234
    232235        if (SL_ISERROR (count))
     
    873876  sh_string * content;
    874877
     878#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    875879  unsigned long pages_read;
    876 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
     880
    877881  /*@-nestedextern@*/
    878882  extern long IO_Limit;
     
    896900    }
    897901
     902#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    898903  pages_read = 0;
    899 
     904#endif
     905 
    900906  content = sl_get_content(fd);
    901907
     
    967973           && n != 0);
    968974
     975#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    969976    ++pages_read;
     977#endif
    970978
    971979    /* If end of file is reached, end the loop.  */
     
    14171425  sh_string * content;
    14181426
     1427#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    14191428  unsigned long pages_read;
    1420 #if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
     1429
    14211430  /*@-nestedextern@*/
    14221431  extern long IO_Limit;
     
    14451454  /* Iterate over full file contents.  */
    14461455
     1456#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    14471457  pages_read = 0;
    1448 
     1458#endif
     1459 
    14491460  content = sl_get_content(fd);
    14501461
     
    15151526           && n != 0);
    15161527
     1528#if defined (SH_WITH_CLIENT) || defined (SH_STANDALONE)
    15171529    ++pages_read;
    1518 
     1530#endif
     1531   
    15191532    /* If end of file is reached, end the loop.  */
    15201533    if (n == 0)
Note: See TracChangeset for help on using the changeset viewer.