From 974fa934916b0f150292da584fbe41c4fcc95eca Mon Sep 17 00:00:00 2001 From: George Koehler Date: Mon, 13 Nov 2017 18:21:26 -0500 Subject: [PATCH] Silence warning about pointer cast to int. This cast was safe because the pointer is a small constant integer, but it causes warning from gcc. --- lang/pc/comp/declar.g | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/pc/comp/declar.g b/lang/pc/comp/declar.g index 4ee1fcf89..54f488fe0 100644 --- a/lang/pc/comp/declar.g +++ b/lang/pc/comp/declar.g @@ -5,6 +5,7 @@ /* next line DEBUG */ #include "debug.h" +#include #include #include #include @@ -21,7 +22,7 @@ #include "scope.h" #include "type.h" -#define PC_BUFSIZ (sizeof(struct file) - (int)((struct file *)0)->bufadr) +#define PC_BUFSIZ (sizeof(struct file) - offsetof(struct file, bufadr)) int proclevel = 0; /* nesting level of procedures */ int parlevel = 0; /* nesting level of parametersections */