Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[skip ci] fix more -Wgnu-zero-variadic-macro-arguments
  • Loading branch information
wwmayer committed Nov 13, 2019
1 parent 25f34a0 commit 4291a08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Gui/Command.h
Expand Up @@ -444,12 +444,13 @@ class GuiExport Command : public CommandBase
/// Print to Python console the current calling source file and line number
static void printCaller(const char *file, int line);

//FIXME: ISO C++11 requires at least one argument for the "..." in a variadic macro
// ISO C++11 requires at least one argument for the "..." in a variadic macro
// https://en.wikipedia.org/wiki/Variadic_macro#Example
/** Convenience macro to run a command with printf like formatter
*
* @sa Command::_doCommand()
*/
#define doCommand(_type,...) _doCommand(__FILE__,__LINE__,_type,##__VA_ARGS__)
#define doCommand(...) _doCommand(__FILE__,__LINE__,__VA_ARGS__)

/** Run a command with printf like formatter
*
Expand Down Expand Up @@ -516,7 +517,7 @@ class GuiExport Command : public CommandBase
/** @name Methods for copying visiual properties */
//@{
/// Convenience macro to copy visual properties
#define copyVisual(...) _copyVisual(__FILE__,__LINE__,## __VA_ARGS__)
#define copyVisual(...) _copyVisual(__FILE__,__LINE__,__VA_ARGS__)
static void _copyVisual(const char *file, int line, const char* to, const char* attr, const char* from);
static void _copyVisual(const char *file, int line, const char* to, const char* attr_to, const char* from, const char* attr_from);
static void _copyVisual(const char *file, int line, const App::DocumentObject *to, const char *attr, const App::DocumentObject *from);
Expand Down

0 comments on commit 4291a08

Please sign in to comment.