Changeset 362 for trunk/src/sh_unix.c


Ignore:
Timestamp:
Oct 19, 2011, 12:16:31 AM (13 years ago)
Author:
katerina
Message:

Fix for ticket #267 (Multiple compiler warnings with gcc 4.6.1).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_unix.c

    r343 r362  
    21692169  struct tm   aa;
    21702170  struct tm   bb;
    2171   struct tm * cc;
     2171
    21722172  int  sign =  0;
    21732173  int  diff =  0;
     
    21782178
    21792179#if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GMTIME_R)
    2180   cc = gmtime_r (xx, &aa);
    2181 #else
    2182   cc = gmtime (xx);
    2183   memcpy (&aa, cc, sizeof(struct tm));
     2180  gmtime_r (xx, &aa);
     2181#else
     2182  memcpy (&aa, gmtime(xx), sizeof(struct tm));
    21842183#endif
    21852184
    21862185#if defined(HAVE_PTHREAD) && defined (_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_LOCALTIME_R)
    2187   cc = localtime_r (xx, &bb);
    2188 #else
    2189   cc = localtime (xx);
    2190   memcpy (&bb, cc, sizeof(struct tm));
     2186  localtime_r (xx, &bb);
     2187#else
     2188  memcpy (&bb, localtime(xx), sizeof(struct tm));
    21912189#endif
    21922190
Note: See TracChangeset for help on using the changeset viewer.