From: Mark Wooding Date: Wed, 19 Jun 2013 00:35:21 +0000 (+0100) Subject: sel/bres.c: Rewrite list hacking to avoid strict-aliasing badness. X-Git-Tag: 2.2.1~8 X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/commitdiff_plain/ffb41122634402c842ffea1b323e9f166b2bcfa7?hp=ffb41122634402c842ffea1b323e9f166b2bcfa7 sel/bres.c: Rewrite list hacking to avoid strict-aliasing badness. The circular list stuff was quite pretty but involved some really unpleasant casting which modern GCC (quite properly) complains about vociferously. Replace it with more traditional doubly-linked-list hacking with null-pointer sentinels, with the slightly nasty pointer swizzling tucked away in useful macros. Some of the uses of these macros (e.g., unlinking the first or last item in a list) could be made more efficient by using special-case versions, but it doesn't seem worthwhile. ---