From 013aec894bad860bcbe531446c423be918f2674e Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 18 Mar 2016 22:11:02 +0900 Subject: [PATCH] opal/class/opal_lifo: rename a local variable initially called new this file is now indirectly included from C++, and new is a reserved C++ keyword --- opal/class/opal_lifo.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opal/class/opal_lifo.h b/opal/class/opal_lifo.h index a4e106343a..61a0f121a4 100644 --- a/opal/class/opal_lifo.h +++ b/opal/class/opal_lifo.h @@ -14,6 +14,8 @@ * Copyright (c) 2010 IBM Corporation. All rights reserved. * Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights * reseved. + * Copyright (c) 2016 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -66,8 +68,8 @@ typedef union opal_counted_pointer_t opal_counted_pointer_t; static inline bool opal_update_counted_pointer (volatile opal_counted_pointer_t *addr, opal_counted_pointer_t old, opal_list_item_t *item) { - opal_counted_pointer_t new = {.data = {.item = item, .counter = old.data.counter + 1}}; - return opal_atomic_cmpset_128 (&addr->value, old.value, new.value); + opal_counted_pointer_t new_p = {.data = {.item = item, .counter = old.data.counter + 1}}; + return opal_atomic_cmpset_128 (&addr->value, old.value, new_p.value); } #endif