Skip to content
  • Christian Persch's avatar
    cell: Silence an incorrect warning · 089b7964
    Christian Persch authored
    Compiling cell.hh with clang generates lots of warnings of the form:
    
    ./cell.hh:102:9: warning: taking address of packed member 'm_colors'
    of class or structure 'VteCellAttr' may result in an unaligned pointer
    value [-Waddress-of-packed-member]
            CELL_ATTR_COLOR(fore)
            ^~~~~~~~~~~~~~~~~~~~~
    ./cell.hh:94:46: note: expanded from macro 'CELL_ATTR_COLOR'
                    vte_color_triple_set_##name(&m_colors, value); \
                                                 ^~~~~~~~
    
    However, VteCellAttr is only ever used as a member of VteCell,
    where it has offset 4, resulting in the pointers being aligned
    sufficiently.
    089b7964