diff options
author | Jon Wilkes <jon@pluckeye.net> | 2020-10-27 12:47:57 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-18 14:02:27 +0100 |
commit | e2075f233750bb79d72198ca60b3c821070ecd99 (patch) | |
tree | 35fad10f85d5505c91753e9704f1193a68aa8d27 | |
parent | 8fb9f43f819057da3c69ffb4f15f2db2e237c0dd (diff) | |
download | curl-e2075f233750bb79d72198ca60b3c821070ecd99.tar.gz |
cookie: avoid the C1001 internal compiler error with MSVC 14
Fixes #6112
Closes #6135
-rw-r--r-- | lib/cookie.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/cookie.c b/lib/cookie.c index e88678c21..09fd092ac 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -264,6 +264,11 @@ static const char *get_top_domain(const char * const domain, size_t *outlen) return first? first: domain; } +/* Avoid C1001, an "internal error" with MSVC14 */ +#if defined(_MSC_VER) && (_MSC_VER == 1900) +#pragma optimize("", off) +#endif + /* * A case-insensitive hash for the cookie domains. */ @@ -280,6 +285,10 @@ static size_t cookie_hash_domain(const char *domain, const size_t len) return (h % COOKIE_HASH_SIZE); } +#if defined(_MSC_VER) && (_MSC_VER == 1900) +#pragma optimize("", on) +#endif + /* * Hash this domain. */ |