瀏覽代碼

[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 6 年之前
父節點
當前提交
033e8cb07c
共有 1 個文件被更改,包括 1 次插入1 次删除
  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");