Changeset 465 for trunk


Ignore:
Timestamp:
Mar 8, 2015, 6:02:28 PM (10 years ago)
Author:
katerina
Message:

Fix for ticket #364 (gcc 4.9 compiler bugs).

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_files.c

    r458 r465  
    589589  return zAVL_string_get (fileTree, path);
    590590}
     591
     592static void * sh_dummy_candidate;
     593
    591594static char * intern_find_morespecific_dir(zAVLTree * tree,
    592595                                           const char * path, size_t * len)
     
    601604  if (NULL == tree)
    602605    return NULL;
     606
     607  sh_dummy_candidate = (void *) &candidate;
    603608
    604609  SH_MUTEX_LOCK(mutex_zfiles);
  • trunk/src/sh_inotify.c

    r454 r465  
    2121
    2222#if defined(HAVE_SYS_INOTIFY_H)
     23
     24#if defined(GCC_VERSION_MAJOR)
     25#if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 8))
     26#pragma GCC diagnostic ignored "-Wclobbered"
     27#endif
     28#endif
    2329
    2430#undef  FIL__
  • trunk/src/sh_nmail.c

    r363 r465  
    2222#if defined(HAVE_PTHREAD_MUTEX_RECURSIVE)
    2323#define _XOPEN_SOURCE 500
     24#endif
     25
     26#if defined(GCC_VERSION_MAJOR)
     27#if (GCC_VERSION_MAJOR > 4) || ((GCC_VERSION_MAJOR == 4) && (GCC_VERSION_MINOR > 8))
     28#pragma GCC diagnostic ignored "-Wclobbered"
     29#endif
    2430#endif
    2531
  • trunk/src/zAVLTree.c

    r458 r465  
    3939  return (zAVLKey) arg;
    4040}
     41static char * dummy_zfree_string;
    4142static void zfree_string (void * inptr)
    4243{
    4344  char * str = (char *) inptr;
     45
     46  /* Take the address to circumvent gcc 4.9 optimizer bug */
     47  dummy_zfree_string = (char *) &inptr;
     48
    4449  str[0] = '\0';
    45   free (str);
     50  free (inptr);
    4651  return;
    4752}
Note: See TracChangeset for help on using the changeset viewer.