Changeset 7535


Ignore:
Timestamp:
07/01/18 23:20:09 (3 weeks ago)
Author:
baker
Message:

#pragma GCC diagnostic not allowed inside function on GCC 4.4.7 (CentOS 6)

Location:
trunk/src/data_exchange/scn_convert
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/data_exchange/scn_convert/to_trace_scn.c

    r7528 r7535  
    2020       *******************************************************/ 
    2121 
     22/* #pragma GCC: silence Linux GCC missing field initializer warning           */ 
     23/* #pragma GCC diagnostic not allowed inside function on GCC 4.4.7 (CentOS 6) */ 
     24#ifdef __GNUC__ 
     25#pragma GCC diagnostic push 
     26#pragma GCC diagnostic ignored "-Wmissing-field-initializers" 
     27#endif 
     28 
    2229int to_trace_scn( char *msg ) { 
    2330 
     
    2936#pragma clang diagnostic ignored "-Wmissing-field-initializers" 
    3037#endif 
    31 /* #pragma GCC: silence Linux GCC missing field initializer warning */ 
    32 #ifdef __GNUC__ 
    33 #pragma GCC diagnostic push 
    34 #pragma GCC diagnostic ignored "-Wmissing-field-initializers" 
    35 #endif 
    3638    S2S s = { { 0 } }; 
    3739#ifdef __clang__ 
    3840#pragma clang diagnostic pop 
    39 #endif 
    40 #ifdef __GNUC__ 
    41 #pragma GCC diagnostic pop 
    4241#endif 
    4342 
     
    6665    return 0; 
    6766} 
     67 
     68#ifdef __GNUC__ 
     69#pragma GCC diagnostic pop 
     70#endif 
  • trunk/src/data_exchange/scn_convert/to_trace_scnl.c

    r7528 r7535  
    2020       *******************************************************/ 
    2121 
     22/* #pragma GCC: silence Linux GCC missing field initializer warning           */ 
     23/* #pragma GCC diagnostic not allowed inside function on GCC 4.4.7 (CentOS 6) */ 
     24#ifdef __GNUC__ 
     25#pragma GCC diagnostic push 
     26#pragma GCC diagnostic ignored "-Wmissing-field-initializers" 
     27#endif 
     28 
    2229int to_trace_scnl( char *msg ) { 
    2330 
     
    2936#pragma clang diagnostic ignored "-Wmissing-field-initializers" 
    3037#endif 
    31 /* #pragma GCC: silence Linux GCC missing field initializer warning */ 
    32 #ifdef __GNUC__ 
    33 #pragma GCC diagnostic push 
    34 #pragma GCC diagnostic ignored "-Wmissing-field-initializers" 
    35 #endif 
    3638    S2S s = { { 0 } }; 
    3739#ifdef __clang__ 
    3840#pragma clang diagnostic pop 
    39 #endif 
    40 #ifdef __GNUC__ 
    41 #pragma GCC diagnostic pop 
    4241#endif 
    4342 
     
    7069    return 0; 
    7170} 
     71 
     72#ifdef __GNUC__ 
     73#pragma GCC diagnostic pop 
     74#endif 
Note: See TracChangeset for help on using the changeset viewer.