summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-03-13 15:34:12 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-03-13 15:34:12 +0200
commit6f3740f74ed48daf51908676b203f1889455c17d (patch)
tree2cd799d7af89e1a5bbb7ae80b55099c9a907ec14
parent1396dce2aeeaea9f15ca5f495718bc85aeda8bd8 (diff)
Fix warning on clang.
Update issue 67 Status: FixedInGit
-rw-r--r--pb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/pb.h b/pb.h
index bf6b35e7..b9c3f759 100644
--- a/pb.h
+++ b/pb.h
@@ -224,7 +224,7 @@ typedef enum {
#define pb_membersize(st, m) (sizeof ((st*)0)->m)
#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0]))
#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2))
-#define pb_delta_end(st, m1, m2) (offsetof(st, m1) == offsetof(st, m2) \
+#define pb_delta_end(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \
? offsetof(st, m1) \
: offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2))
#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0}