diff options
| author | Daniel Richard G <skunk@iSKUNK.ORG> | 2012-08-02 19:53:12 +0200 |
|---|---|---|
| committer | Andre Noll <maan@systemlinux.org> | 2012-08-04 13:34:54 +0200 |
| commit | 5083502f5fbe2d2b427451aff54c0cdc1831d7c0 (patch) | |
| tree | e18a5333399e24ebcc82132a9339bdcd485bc108 /error.h | |
| parent | 97fbf4e7ae1416c60e70657e5b918e9e0d129383 (diff) | |
Fix "comma after last element" warning.
This changes the definition of DSS_ERRORS so that it includes the commas,
and removes the comma from both definitions of DSS_ERROR. This
avoids "comma after last element" warnings, which on some compilers
produces an error.
Diffstat (limited to 'error.h')
| -rw-r--r-- | error.h | 37 |
1 files changed, 18 insertions, 19 deletions
@@ -38,33 +38,32 @@ static inline char *dss_strerror(int num) } #define DSS_ERRORS \ - DSS_ERROR(SUCCESS, "success") \ - DSS_ERROR(SYNTAX, "syntax error") \ - DSS_ERROR(ATOI_OVERFLOW, "value too large") \ - DSS_ERROR(STRTOLL, "unknown strtoll error") \ - DSS_ERROR(ATOI_NO_DIGITS, "no digits found in string") \ - DSS_ERROR(ATOI_JUNK_AT_END, "further characters after number") \ - DSS_ERROR(INVALID_NUMBER, "invalid number") \ - DSS_ERROR(STRFTIME, "strftime() failed") \ - DSS_ERROR(LOCALTIME, "localtime() failed") \ - DSS_ERROR(NULL_OPEN, "can not open /dev/null") \ - DSS_ERROR(DUP_PIPE, "exec error: can not create pipe") \ - DSS_ERROR(INVOLUNTARY_EXIT, "unexpected termination cause") \ - DSS_ERROR(BAD_EXIT_CODE, "unexpected exit code") \ - DSS_ERROR(SIGNAL_SIG_ERR, "signal() returned SIG_ERR") \ - DSS_ERROR(SIGNAL, "caught terminating signal") \ - DSS_ERROR(BUG, "values of beta might cause dom!") \ - + DSS_ERROR(SUCCESS, "success"), \ + DSS_ERROR(SYNTAX, "syntax error"), \ + DSS_ERROR(ATOI_OVERFLOW, "value too large"), \ + DSS_ERROR(STRTOLL, "unknown strtoll error"), \ + DSS_ERROR(ATOI_NO_DIGITS, "no digits found in string"), \ + DSS_ERROR(ATOI_JUNK_AT_END, "further characters after number"), \ + DSS_ERROR(INVALID_NUMBER, "invalid number"), \ + DSS_ERROR(STRFTIME, "strftime() failed"), \ + DSS_ERROR(LOCALTIME, "localtime() failed"), \ + DSS_ERROR(NULL_OPEN, "can not open /dev/null"), \ + DSS_ERROR(DUP_PIPE, "exec error: can not create pipe"), \ + DSS_ERROR(INVOLUNTARY_EXIT, "unexpected termination cause"), \ + DSS_ERROR(BAD_EXIT_CODE, "unexpected exit code"), \ + DSS_ERROR(SIGNAL_SIG_ERR, "signal() returned SIG_ERR"), \ + DSS_ERROR(SIGNAL, "caught terminating signal"), \ + DSS_ERROR(BUG, "values of beta might cause dom!") /** * This is temporarily defined to expand to its first argument (prefixed by * 'E_') and gets later redefined to expand to the error text only */ -#define DSS_ERROR(err, msg) E_ ## err, +#define DSS_ERROR(err, msg) E_ ## err enum dss_error_codes { DSS_ERRORS }; #undef DSS_ERROR -#define DSS_ERROR(err, msg) msg, +#define DSS_ERROR(err, msg) msg #define DEFINE_DSS_ERRLIST char *dss_errlist[] = {DSS_ERRORS} |
