From d401dfdb70173cc11af0c8bbd929b68ab45a0e7e Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Tue, 23 Sep 2014 09:37:47 +0200 Subject: [PATCH] use _XBT_GNUC_UNUSED instead of previous buggy fix. Thanks agier for the report --- src/surf/vm_workstation_hl13.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/surf/vm_workstation_hl13.cpp b/src/surf/vm_workstation_hl13.cpp index 996f28698d..563c3dba29 100644 --- a/src/surf/vm_workstation_hl13.cpp +++ b/src/surf/vm_workstation_hl13.cpp @@ -70,10 +70,10 @@ double WorkstationVMHL13Model::shareResources(double now) /* 0. Make sure that we already calculated the resource share at the physical * machine layer. */ { - ModelPtr ws_model = surf_workstation_model; - ModelPtr vm_ws_model = surf_vm_workstation_model; - unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model); - unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model); + _XBT_GNUC_UNUSED ModelPtr ws_model = surf_workstation_model; + _XBT_GNUC_UNUSED ModelPtr vm_ws_model = surf_vm_workstation_model; + _XBT_GNUC_UNUSED unsigned int index_of_pm_ws_model = xbt_dynar_search(model_list_invoke, &ws_model); + _XBT_GNUC_UNUSED unsigned int index_of_vm_ws_model = xbt_dynar_search(model_list_invoke, &vm_ws_model); xbt_assert((index_of_pm_ws_model < index_of_vm_ws_model), "Cannot assume surf_workstation_model comes before"); /* Another option is that we call sub_ws->share_resource() here. The @@ -278,7 +278,7 @@ WorkstationVMHL13::WorkstationVMHL13(WorkstationVMModelPtr model, const char* na WorkstationVMHL13::~WorkstationVMHL13() { /* Free the cpu_action of the VM. */ - int ret = p_action->unref(); + _XBT_GNUC_UNUSED int ret = p_action->unref(); xbt_assert(ret == 1, "Bug: some resource still remains"); } @@ -389,7 +389,7 @@ void WorkstationVMHL13::migrate(surf_resource_t ind_dst_pm) new_cpu_action->setBound(old_bound); } - int ret = p_action->unref(); + _XBT_GNUC_UNUSED int ret = p_action->unref(); xbt_assert(ret == 1, "Bug: some resource still remains"); p_action = new_cpu_action; -- 2.20.1