Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let it compile in paranoid mode without _XBT_GNUC_UNUSED (cosmetics only)
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 9 Nov 2010 17:20:27 +0000 (17:20 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 9 Nov 2010 17:20:27 +0000 (17:20 +0000)
The main issue of the previous fix to the problem (by Arnaud G) was
that it documented the commit in the source, explaining why it was
mandatory in a C comment. That's source bloat in my mind:
git blame+git log can give you the same information if you need it.

So I figured out an excuse to recommit on top of it, and here we go :)

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8512 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/bindings/lua/simgrid_lua.c

index 5464bbf..5ada153 100644 (file)
@@ -416,19 +416,13 @@ static int trace_start(lua_State *L)
 
 static int trace_category(lua_State * L)
 {
-  /* _XBT_GNUC_UNUSED to pass compilation in paranoid mode without tracing
-   * support, where TRACE_category(x) is preprocessed to nothing. */
-  const char *category _XBT_GNUC_UNUSED = luaL_checkstring(L, 1);
-  TRACE_category(category);
+  TRACE_category(luaL_checkstring(L, 1));
   return 1;
 }
 
 static int trace_set_task_category(lua_State *L)
 {
-  /* _XBT_GNUC_UNUSED as above */
-  m_task_t tk _XBT_GNUC_UNUSED = checkTask(L, -2);
-  const char *category _XBT_GNUC_UNUSED = luaL_checkstring(L, -1);
-  TRACE_msg_set_task_category(tk, category);
+  TRACE_msg_set_task_category(checkTask(L, -2), luaL_checkstring(L, -1));
   return 1;
 }