Changeset 383 for trunk/src/sh_files.c


Ignore:
Timestamp:
Dec 5, 2011, 10:30:33 PM (13 years ago)
Author:
katerina
Message:

Fix for ticket #281 (warnings from clang static analyzer).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_files.c

    r381 r383  
    107107  po = SH_ALLOC(len+1); *po = '\0'; p = po; pend = &po[len];
    108108
    109   i = 0; q = s;
     109  q = s;
    110110
    111111  do
     
    925925#endif
    926926
    927 int sh_files_push_file_int (int class, const char * str_s, size_t len, unsigned long check_mask)
     927int sh_files_push_file_int (int class, const char * str_s, size_t len,
     928                            unsigned long check_mask)
    928929{
    929930  dirstack_t * new_item_ptr;
    930931  char  * fileName;
    931932  int     ret;
    932   int     count = 0;
     933  volatile int     count = 0;
    933934
    934935  SL_ENTER(_("sh_files_push_file_int"));
     
    10221023  glob_t  pglob;
    10231024
    1024   int     count = 0;
     1025  volatile int     count = 0;
    10251026  volatile unsigned long check_mask = (flag == 0) ? sh_files_maskof(class) : check_mask_in;
    10261027 
     
    18771878
    18781879static void * sh_dummy_dirlist;
     1880static void * sh_dummy_tmpcat;
    18791881
    18801882/* -- Check a single directory and its content. Does not
     
    19041906  int             class  = 0;
    19051907  volatile int    rdepth_next;
    1906   int             class_next;
     1908  volatile int    class_next;
    19071909  volatile int    file_class_next;
    1908   unsigned long   check_mask_next;
     1910  volatile unsigned long   check_mask_next;
    19091911  volatile unsigned long   file_check_mask_next;
    19101912
     
    19211923
    19221924  SL_ENTER(_("sh_files_checkdir"));
    1923 
    1924   sh_dummy_dirlist = (void *) &dirlist;
    19251925
    19261926  if (sig_urgent > 0) {
     
    20642064  sl_strlcpy (theDir->DirPath, iname, PATH_MAX);
    20652065
     2066
     2067  sh_dummy_dirlist = (void *) &dirlist;
     2068  sh_dummy_tmpcat  = (void *) &tmpcat;
    20662069
    20672070  /* ---- read ----
     
    23472350      {
    23482351        SH_FREE(theDir);
     2352        sh_dummy_dirlist = NULL;
    23492353        SL_RETURN((0), _("sh_files_checkdir"));
    23502354      }
     
    23972401  SH_FREE(tmpname);
    23982402  SH_FREE(theDir);
     2403
     2404  sh_dummy_dirlist = NULL;
    23992405
    24002406  SL_RETURN((0), _("sh_files_checkdir"));
     
    26862692                        int * rdepth)
    26872693{
    2688   int retval = 0;
     2694  volatile int retval = 0;
    26892695#if defined(HAVE_GLOB_H) && defined(HAVE_FNMATCH_H)
    26902696  sh_globstack_t * testPattern;
     
    27572763                         unsigned long *check_mask, int *reported)
    27582764{
    2759   int retval = 0;
     2765  volatile int retval = 0;
    27602766#if defined(HAVE_GLOB_H) && defined(HAVE_FNMATCH_H)
    27612767  sh_globstack_t * testPattern;
Note: See TracChangeset for help on using the changeset viewer.