Tidy up some warnings.

Updating clang seems to have upset the clang-cl build. I think because
they decided -Wall now matches MSVC's semantics, which is a little nuts.
Two of the warnings, however, weren't wrong, so fix those.

http://llvm.org/viewvc/llvm-project?view=revision&revision=319116

Change-Id: I168e52e4e70ca7b1069e0b0db241fb5305c12b1e
Reviewed-on: https://boringssl-review.googlesource.com/24684
Reviewed-by: Steven Valdez <svaldez@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/include/openssl/base.h b/include/openssl/base.h
index cc962f3..9edaa5c 100644
--- a/include/openssl/base.h
+++ b/include/openssl/base.h
@@ -228,9 +228,10 @@
 #define OPENSSL_FALLTHROUGH [[fallthrough]]
 #elif defined(__cplusplus) && __cplusplus >= 201103L && defined(__clang__)
 #define OPENSSL_FALLTHROUGH [[clang::fallthrough]]
-#elif defined(__cplusplus) && __cplusplus >= 201103L && __GNUC__ >= 7
+#elif defined(__cplusplus) && __cplusplus >= 201103L && defined(__GNUC__) && \
+    __GNUC__ >= 7
 #define OPENSSL_FALLTHROUGH [[gnu::fallthrough]]
-#elif  __GNUC__ >= 7 // gcc 7
+#elif defined(__GNUC__) && __GNUC__ >= 7 // gcc 7
 #define OPENSSL_FALLTHROUGH __attribute__ ((fallthrough))
 #else // C++11 on gcc 6, and all other cases
 #define OPENSSL_FALLTHROUGH
diff --git a/include/openssl/stack.h b/include/openssl/stack.h
index 46f57a3..625f66e 100644
--- a/include/openssl/stack.h
+++ b/include/openssl/stack.h
@@ -344,7 +344,7 @@
       sk_##name##_deep_copy(const STACK_OF(name) *sk,                          \
                             ptrtype(*copy_func)(ptrtype),                      \
                             void (*free_func)(ptrtype)) {                      \
-    return (STACK_OF(name) *)sk_deep_copy((_STACK *)sk,                        \
+    return (STACK_OF(name) *)sk_deep_copy((const _STACK *)sk,                  \
                                           (void *(*)(void *))copy_func,        \
                                           (void (*)(void *))free_func);        \
   }