src: avoid compiler warning in node_revert.cc
authorJames M Snell <jasnell@gmail.com>
Mon, 8 Feb 2016 19:20:35 +0000 (11:20 -0800)
committerJames M Snell <jasnell@gmail.com>
Tue, 9 Feb 2016 16:42:15 +0000 (08:42 -0800)
PR-URL: https://github.com/nodejs/node-private/pull/20

src/node_revert.cc

index 7a4f59d..48f03a8 100644 (file)
@@ -25,7 +25,7 @@ void Revert(const char* cve) {
 #define V(code, label, _)                                                     \
   do {                                                                        \
     if (strcmp(cve, label) == 0) {                                            \
-      Revert(REVERT_ ## code);                                                \
+      Revert(static_cast<unsigned int>(REVERT_ ## code));                     \
       return;                                                                 \
     }                                                                         \
   } while (0);
@@ -43,7 +43,7 @@ bool IsReverted(const char * cve) {
 #define V(code, label, _)                                                     \
   do {                                                                        \
     if (strcmp(cve, label) == 0)                                              \
-      return IsReverted(REVERT_ ## code);                                    \
+      return IsReverted(static_cast<unsigned int>(REVERT_ ## code));          \
   } while (0);
   REVERSIONS(V)
   return false;