mirror of https://gerrit.osmocom.org/libosmocore
logging: Fix compile breakage introduced by the warning fixes
Make sure the declaration and definition match, add const to the functions called by logp/logp2. Compile output: logging.c:317: error: conflicting types for 'logp' ../include/osmocom/core/logging.h:34: note: previous declaration of 'logp' was here logging.c:327: error: conflicting types for 'logp2' ../include/osmocom/core/logging.h:168: note: previous declaration of 'logp2' was here make[3]: *** [logging.lo] Error 1
This commit is contained in:
parent
e62651f220
commit
fb4bfc2ad5
|
@ -28,7 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void osmo_vlogp(int subsys, int level, char *file, int line,
|
void osmo_vlogp(int subsys, int level, const char *file, int line,
|
||||||
int cont, const char *format, va_list ap);
|
int cont, const char *format, va_list ap);
|
||||||
|
|
||||||
void logp(int subsys, const char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 5, 6)));
|
void logp(int subsys, const char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 5, 6)));
|
||||||
|
|
|
@ -214,7 +214,7 @@ static const char* color(int subsys)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _output(struct log_target *target, unsigned int subsys,
|
static void _output(struct log_target *target, unsigned int subsys,
|
||||||
unsigned int level, char *file, int line, int cont,
|
unsigned int level, const char *file, int line, int cont,
|
||||||
const char *format, va_list ap)
|
const char *format, va_list ap)
|
||||||
{
|
{
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
|
@ -264,7 +264,7 @@ err:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief vararg version of logging function */
|
/*! \brief vararg version of logging function */
|
||||||
void osmo_vlogp(int subsys, int level, char *file, int line,
|
void osmo_vlogp(int subsys, int level, const char *file, int line,
|
||||||
int cont, const char *format, va_list ap)
|
int cont, const char *format, va_list ap)
|
||||||
{
|
{
|
||||||
struct log_target *tar;
|
struct log_target *tar;
|
||||||
|
@ -314,7 +314,7 @@ void osmo_vlogp(int subsys, int level, char *file, int line,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void logp(int subsys, char *file, int line, int cont,
|
void logp(int subsys, const char *file, int line, int cont,
|
||||||
const char *format, ...)
|
const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -324,7 +324,7 @@ void logp(int subsys, char *file, int line, int cont,
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void logp2(int subsys, unsigned int level, char *file, int line, int cont, const char *format, ...)
|
void logp2(int subsys, unsigned int level, const char *file, int line, int cont, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue