Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mark unused parameters in C code.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 17 Oct 2017 13:09:45 +0000 (15:09 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 17 Oct 2017 15:37:26 +0000 (17:37 +0200)
examples/msg/process-startkilltime/process-startkilltime.c
src/xbt/automaton/automaton.c
src/xbt/mmalloc/mm_legacy.c
src/xbt/xbt_log_layout_simple.c
src/xbt/xbt_os_thread.c

index 6e12c39..1c69571 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -8,7 +8,8 @@
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
 /* Executed on process termination*/
-static int my_onexit(void* ignored1, void *ignored2) {
+static int my_onexit(void* XBT_ATTRIB_UNUSED ignored1, void* XBT_ATTRIB_UNUSED ignored2)
+{
   XBT_INFO("Exiting now (done sleeping or got killed)."); /* - Just display an informative message (see tesh file) */
   return 0;
 }
index eb1e879..ee8be8e 100644 (file)
@@ -95,7 +95,9 @@ xbt_dynar_t xbt_automaton_get_transitions(xbt_automaton_t a){
   return a->transitions;
 }
 
-xbt_automaton_transition_t xbt_automaton_get_transition(xbt_automaton_t a, xbt_automaton_state_t src, xbt_automaton_state_t dst){
+xbt_automaton_transition_t xbt_automaton_get_transition(xbt_automaton_t XBT_ATTRIB_UNUSED a, xbt_automaton_state_t src,
+                                                        xbt_automaton_state_t dst)
+{
   xbt_automaton_transition_t transition;
   unsigned int cursor;
   xbt_dynar_foreach(src->out, cursor, transition){
index 6b96776..b02719c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2015. The SimGrid Team.
+/* Copyright (c) 2010-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -92,12 +92,12 @@ static void* mm_fake_calloc(size_t nmemb, size_t size)
   return mm_fake_malloc(n);
 }
 
-static void* mm_fake_realloc(void *p, size_t s)
+static void* mm_fake_realloc(void* XBT_ATTRIB_UNUSED p, size_t s)
 {
   return mm_fake_malloc(s);
 }
 
-static void mm_fake_free(void *p)
+static void mm_fake_free(void* XBT_ATTRIB_UNUSED p)
 {
   // Nothing to do
 }
index b890b15..57069fd 100644 (file)
@@ -23,7 +23,7 @@ static double simple_begin_of_time = -1;
   } else                                                                \
     return 0
 
-static int xbt_log_layout_simple_doit(xbt_log_layout_t l, xbt_log_event_t ev, const char *fmt)
+static int xbt_log_layout_simple_doit(xbt_log_layout_t XBT_ATTRIB_UNUSED l, xbt_log_event_t ev, const char* fmt)
 {
   char *p = ev->buffer;
   int rem_size = ev->buffer_size;
@@ -70,7 +70,7 @@ static int xbt_log_layout_simple_doit(xbt_log_layout_t l, xbt_log_event_t ev, co
   return 1;
 }
 
-xbt_log_layout_t xbt_log_layout_simple_new(char *arg)
+xbt_log_layout_t xbt_log_layout_simple_new(char* XBT_ATTRIB_UNUSED arg)
 {
   xbt_log_layout_t res = xbt_new0(s_xbt_log_layout_t, 1);
   res->do_layout       = &xbt_log_layout_simple_doit;
index 2652bc9..8690348 100644 (file)
@@ -162,7 +162,8 @@ xbt_os_thread_t xbt_os_thread_create(const char *name,  pvoid_f_pvoid_t start_ro
  *
  * If pthread_setaffinity_np is not usable on that (non-gnu) platform, this function does nothing.
  */
-int xbt_os_thread_bind(xbt_os_thread_t thread, int cpu){
+int xbt_os_thread_bind(xbt_os_thread_t XBT_ATTRIB_UNUSED thread, int XBT_ATTRIB_UNUSED cpu)
+{
   int errcode = 0;
 #if HAVE_PTHREAD_SETAFFINITY
   pthread_t pthread = thread->t;