aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-07-10 13:10:15 +0200
committerHarald Welte <laforge@gnumonks.org>2012-07-10 13:10:15 +0200
commit2d6563b78e699ee8ac1bd3bc556889ab8eff975c (patch)
tree6e852537dbf170a32b606c8092a108f26fd89e3d /include
parent2d956a82c8fd3f54fe58ce5a7b597be51c25960b (diff)
logging: Avoid compiler warnings when compiling c++ code
this patch i use to suppress warnings when compiling osmo-pcu (c++). since __FILE__ is constant, the called logging function with parameter "file" must be constant too, in order to avoid compiler warnings.
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/logging.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 76be100..bbaef45 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -31,7 +31,7 @@
void osmo_vlogp(int subsys, int level, char *file, int line,
int cont, const char *format, va_list ap);
-void logp(int subsys, 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)));
/*! \brief Log a new message through the Osmocom logging framework
* \param[in] ss logging subsystem (e.g. \ref DLGLOBAL)
@@ -165,7 +165,7 @@ struct log_target {
};
/* use the above macros */
-void logp2(int subsys, unsigned int level, char *file,
+void logp2(int subsys, unsigned int level, const char *file,
int line, int cont, const char *format, ...)
__attribute__ ((format (printf, 6, 7)));
int log_init(const struct log_info *inf, void *talloc_ctx);