You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by di...@apache.org on 2020/06/09 03:44:58 UTC

[incubator-teaclave-sgx-sdk] branch master updated: Fix a compile error

This is an automated email from the ASF dual-hosted git repository.

dingyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b7c32f  Fix a compile error
     new 77cd2a7  Merge pull request #245 from uudiin/master
7b7c32f is described below

commit 7b7c32f0b0d5e3202826da232b2b6698a2fea78e
Author: tianjia <ti...@linux.alibaba.com>
AuthorDate: Mon Jun 8 16:56:26 2020 +0800

    Fix a compile error
    
    This patch fix following compile error.
    
    signal.c:176:6: error: 'for' loop initial declarations are only allowed in C99 mode
          for (int i = g_signal_dispatch->signal_to_eid_set->size - 1; i >= 0; i--) {
---
 sgx_ustdc/signal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sgx_ustdc/signal.c b/sgx_ustdc/signal.c
index 76e186e..9855fdb 100644
--- a/sgx_ustdc/signal.c
+++ b/sgx_ustdc/signal.c
@@ -165,6 +165,7 @@ int deregister_all_signals_for_eid(unsigned long long eid)
     sigset_t mask = {0};
     sigset_t old_mask = {0};
     key_value_t *kv = NULL;
+    int i;
 
     signal_dispatcher_instance_init();
 
@@ -173,7 +174,7 @@ int deregister_all_signals_for_eid(unsigned long long eid)
     // If this enclave has registered any signals, deregister them and set the
     // signal handler to the default one.
     pthread_mutex_lock(&g_signal_dispatch->lock);
-     for (int i = g_signal_dispatch->signal_to_eid_set->size - 1; i >= 0; i--) {
+     for (i = g_signal_dispatch->signal_to_eid_set->size - 1; i >= 0; i--) {
          if (g_signal_dispatch->signal_to_eid_set->entries[i]) {
             kv = (key_value_t*)g_signal_dispatch->signal_to_eid_set->entries[i];
             if (kv->enclave_id == eid) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org