diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2014-10-28 12:13:07 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-28 09:10:12 -0700 |
commit | 874754e22b8678ab3d5314c56fda860ea844fc55 (patch) | |
tree | 3a6fc21bc9474072ab9be3a91e6e6fc1c9053f91 /dive.h | |
parent | 70a2e91f1cb41a09d9b3c4b67042416c52b3fe4a (diff) | |
download | subsurface-874754e22b8678ab3d5314c56fda860ea844fc55.tar.gz |
dive.h: add a variant of FOR_EACH_PICTURE
This prevents a warning caused by -Waddress, that the address
of 'displayed_dive' will always be defined.
Exact macro variant suggested by Dirk.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -349,6 +349,8 @@ struct picture { if (_dive) \ for (struct picture *picture = (_dive)->picture_list; picture; picture = picture->next) +#define FOR_EACH_PICTURE_NON_PTR(_divestruct) \ + for (struct picture *picture = (_divestruct).picture_list; picture; picture = picture->next) extern struct picture *alloc_picture(); extern void dive_create_picture(struct dive *d, char *filename, int shift_time); |