Ticket #63105: patch-pragmas.diff

File patch-pragmas.diff, 935 bytes (added by ballapete (Peter "Pete" Dyballa), 3 years ago)

Patch to remove #pragma statements fro GCC 4.2

  • base/scommon.h

    old new  
    118118static inline void
    119119stream_cursor_read_init(stream_cursor_read *r, const byte *buf, size_t length)
    120120{
    121 #ifdef __GNUC__
    122 #  pragma GCC diagnostic push
    123 #  pragma GCC diagnostic ignored "-Warray-bounds"
    124 #endif
    125121    /* starting pos for pointer is always one position back */
    126122    r->ptr = buf - 1;
    127123    r->limit = r->ptr + length;
    128 #ifdef __GNUC__
    129 #  pragma GCC diagnostic pop
    130 #endif
    131124}
    132125
    133126static inline void
    134127stream_cursor_write_init(stream_cursor_write *w, const byte *buf, size_t length)
    135128{
    136 #ifdef __GNUC__
    137 #  pragma GCC diagnostic push
    138 #  pragma GCC diagnostic ignored "-Warray-bounds"
    139 #endif
    140129    /* starting pos for pointer is always one position back */
    141130    w->ptr = (byte *)buf - 1;
    142131    w->limit = (byte *)w->ptr + length;
    143 #ifdef __GNUC__
    144 #  pragma GCC diagnostic pop
    145 #endif
    146132}
    147133
    148134/*