Browse Source

[Pal/Linux-SGX] Remove sign compare warning with DEBUG=1

> [ host/Linux-SGX/sgx_main.o ]
> sgx_main.c: In function load_enclave:
> sgx_main.c:673:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>      while (env_i < env_size) {
>                   ^
> cc1: all warnings being treated as errors
Isaku Yamahata 5 years ago
parent
commit
033e8cb07c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Pal/src/host/Linux-SGX/sgx_main.c

+ 1 - 1
Pal/src/host/Linux-SGX/sgx_main.c

@@ -669,7 +669,7 @@ static int load_enclave (struct pal_enclave * enclave,
     pal_sec->gid = INLINE_SYSCALL(getgid, 0);
 
 #ifdef DEBUG
-    int env_i = 0;
+    size_t env_i = 0;
     while (env_i < env_size) {
         if (strcmp_static(&env[env_i], "IN_GDB=1")) {
             SGX_DBG(DBG_I, "being GDB'ed!!!\n");