Fixing clang warnings.

Fixed warnings caused by:
-Wexpansion-to-defined and
-Wconstant-conversion

Files copied directly from Chromium's base.

R=jamesr@chromium.org, phosek@chromium.org

Review URL: https://codereview.chromium.org/1712863003 .
diff --git a/posix/safe_strerror.cc b/posix/safe_strerror.cc
index e80e8f8..798658e 100644
--- a/posix/safe_strerror.cc
+++ b/posix/safe_strerror.cc
@@ -20,7 +20,11 @@
 
 namespace base {
 
-#define USE_HISTORICAL_STRERRO_R (defined(__GLIBC__) || defined(OS_NACL))
+#if defined(__GLIBC__) || defined(OS_NACL)
+#define USE_HISTORICAL_STRERRO_R 1
+#else
+#define USE_HISTORICAL_STRERRO_R 0
+#endif
 
 #if USE_HISTORICAL_STRERRO_R && defined(__GNUC__)
 // GCC will complain about the unused second wrap function unless we tell it
diff --git a/third_party/dynamic_annotations/dynamic_annotations.c b/third_party/dynamic_annotations/dynamic_annotations.c
index f57cb12..4313ecc 100644
--- a/third_party/dynamic_annotations/dynamic_annotations.c
+++ b/third_party/dynamic_annotations/dynamic_annotations.c
@@ -61,10 +61,10 @@
    folding them. */
 #ifdef __COUNTER__
 #define DYNAMIC_ANNOTATIONS_IMPL \
-  volatile short lineno = (__LINE__ << 8) + __COUNTER__; (void)lineno;
+  volatile unsigned short lineno = (__LINE__ << 8) + __COUNTER__; (void)lineno;
 #else
 #define DYNAMIC_ANNOTATIONS_IMPL \
-  volatile short lineno = (__LINE__ << 8); (void)lineno;
+  volatile unsigned short lineno = (__LINE__ << 8); (void)lineno;
 #endif
 
 /* WARNING: always add new annotations to the end of the list.