From: Arnaud Giersch Date: Tue, 21 Jan 2014 09:28:48 +0000 (+0100) Subject: smpi_cocci.h: make functions static. X-Git-Tag: v3_11_beta~141 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/91253bbf28bd453788ae52d3a14b617234e533e2 smpi_cocci.h: make functions static. --- diff --git a/include/smpi/smpi_cocci.h b/include/smpi/smpi_cocci.h index 534c44369b..8243e7ac3e 100644 --- a/include/smpi/smpi_cocci.h +++ b/include/smpi/smpi_cocci.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013. The SimGrid Team. +/* Copyright (c) 2011-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -13,18 +13,18 @@ #define SMPI_VARINIT_GLOBAL(name,type) \ type *name = NULL; \ -void __attribute__((weak,constructor)) __preinit_##name(void) { \ +static void __attribute__((constructor)) __preinit_##name(void) { \ if(!name) \ name = (type*)malloc(smpi_global_size() * sizeof(type)); \ } \ -void __attribute__((weak,destructor)) __postfini_##name(void) { \ +static void __attribute__((destructor)) __postfini_##name(void) { \ free(name); \ name = NULL; \ } #define SMPI_VARINIT_GLOBAL_AND_SET(name,type,expr) \ type *name = NULL; \ -void __attribute__((weak,constructor)) __preinit_##name(void) { \ +static void __attribute__((constructor)) __preinit_##name(void) { \ size_t size = smpi_global_size(); \ size_t i; \ type value = expr; \ @@ -35,7 +35,7 @@ void __attribute__((weak,constructor)) __preinit_##name(void) { \ } \ } \ } \ -void __attribute__((weak,destructor)) __postfini_##name(void) { \ +static void __attribute__((destructor)) __postfini_##name(void) { \ free(name); \ name = NULL; \ }