From 874754e22b8678ab3d5314c56fda860ea844fc55 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 28 Oct 2014 12:13:07 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- dive.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dive.h') diff --git a/dive.h b/dive.h index 1c30a727c..ca81a4c88 100644 --- a/dive.h +++ b/dive.h @@ -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); -- cgit v1.2.3-70-g09d2