]> git.saurik.com Git - cycript.git/commitdiff
Correct "error: taking address of temporary array".
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 11 Oct 2014 05:57:56 +0000 (22:57 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 11 Oct 2014 05:57:56 +0000 (22:57 -0700)
Exception.hpp

index d683369c8e5a5f36e92b45a8985bb3e6ff1d33cb..e72800eca303225f81eca667022a0e37293bcea4 100644 (file)
@@ -79,7 +79,7 @@ _value; })
     fprintf(stderr, "_trace():%u\n", __LINE__); \
 } while (false)
 
     fprintf(stderr, "_trace():%u\n", __LINE__); \
 } while (false)
 
-static _finline bool CYContains(int value, size_t many, int *okay) {
+static _finline bool CYContains(int value, size_t many, const int *okay) {
     for (size_t i(0); i != many; ++i)
         if (value == okay[i])
             return true;
     for (size_t i(0); i != many; ++i)
         if (value == okay[i])
             return true;
@@ -90,7 +90,7 @@ static _finline bool CYContains(int value, size_t many, int *okay) {
     __typeof__(expr) _value; \
     do if ((long) (_value = (expr)) != -1) \
         break; \
     __typeof__(expr) _value; \
     do if ((long) (_value = (expr)) != -1) \
         break; \
-    else if (CYContains(errno, many, ((int [many]) okay))) \
+    else if (CYContains(errno, many, ((const int [many]) okay))) \
         break; \
     else \
         _assert_("syscall", errno == EINTR, #expr, " [errno=%d]", errno); \
         break; \
     else \
         _assert_("syscall", errno == EINTR, #expr, " [errno=%d]", errno); \