From 79921ddca1c23c401791480ef8786565b4f30339 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 16 Jul 2020 10:49:38 +0100 Subject: [PATCH] Squash MSVC warnings. --- src/error.h | 2 ++ src/gumbo.h | 2 ++ src/util.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/error.h b/src/error.h index afc998b1..1f6ed843 100644 --- a/src/error.h +++ b/src/error.h @@ -19,8 +19,10 @@ #ifndef GUMBO_ERROR_H_ #define GUMBO_ERROR_H_ #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif +#endif #include #include "gumbo.h" diff --git a/src/gumbo.h b/src/gumbo.h index f45a583e..6ef70058 100644 --- a/src/gumbo.h +++ b/src/gumbo.h @@ -43,7 +43,9 @@ #define GUMBO_GUMBO_H_ #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #define fileno _fileno #endif diff --git a/src/util.h b/src/util.h index 6ad65649..b3d176d3 100644 --- a/src/util.h +++ b/src/util.h @@ -20,8 +20,10 @@ #ifndef GUMBO_UTIL_H_ #define GUMBO_UTIL_H_ #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif +#endif #include #include