mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 12:00:31 +01:00
WINGs: removed unused variable in syslog messaging code
As pointed by the commpiler, the variable 'syslog_prefix' is not used in the code, so it is removed. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
f5167ae12d
commit
9ee94f8777
@@ -74,7 +74,6 @@ void __wmessage(const char *func, const char *file, int line, int type, const ch
|
|||||||
int truncated = 0;
|
int truncated = 0;
|
||||||
#ifdef HAVE_SYSLOG
|
#ifdef HAVE_SYSLOG
|
||||||
int syslog_priority = LOG_INFO;
|
int syslog_priority = LOG_INFO;
|
||||||
const char *syslog_prefix = "INFO";
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (linemax == 0) {
|
if (linemax == 0) {
|
||||||
@@ -107,21 +106,18 @@ void __wmessage(const char *func, const char *file, int line, int type, const ch
|
|||||||
strncat(buf, _("fatal: "), linemax - 1 - strlen(buf));
|
strncat(buf, _("fatal: "), linemax - 1 - strlen(buf));
|
||||||
#ifdef HAVE_SYSLOG
|
#ifdef HAVE_SYSLOG
|
||||||
syslog_priority = LOG_CRIT;
|
syslog_priority = LOG_CRIT;
|
||||||
syslog_prefix = "FATAL";
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case WMESSAGE_TYPE_ERROR:
|
case WMESSAGE_TYPE_ERROR:
|
||||||
strncat(buf, _("error: "), linemax - 1 - strlen(buf));
|
strncat(buf, _("error: "), linemax - 1 - strlen(buf));
|
||||||
#ifdef HAVE_SYSLOG
|
#ifdef HAVE_SYSLOG
|
||||||
syslog_priority = LOG_ERR;
|
syslog_priority = LOG_ERR;
|
||||||
syslog_prefix = "ERROR";
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case WMESSAGE_TYPE_WARNING:
|
case WMESSAGE_TYPE_WARNING:
|
||||||
strncat(buf, _("warning: "), linemax - 1 - strlen(buf));
|
strncat(buf, _("warning: "), linemax - 1 - strlen(buf));
|
||||||
#ifdef HAVE_SYSLOG
|
#ifdef HAVE_SYSLOG
|
||||||
syslog_priority = LOG_WARNING;
|
syslog_priority = LOG_WARNING;
|
||||||
syslog_prefix = "WARNING";
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case WMESSAGE_TYPE_MESSAGE:
|
case WMESSAGE_TYPE_MESSAGE:
|
||||||
|
|||||||
Reference in New Issue
Block a user