Skip to content

Commit

Permalink
Fix warnings around log statements related to char* vs. const char*.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmichalek committed Oct 9, 2015
1 parent a5820f9 commit e9bb561
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion symmetric-client-clib/inc/common/Log.h
Expand Up @@ -26,4 +26,4 @@ typedef enum {DEBUG, INFO, WARN, ERROR} LogLevel;
#define SymLog_warn(M, ...) SymLog_log(2, __func__, __FILE__, __LINE__, M, ##__VA_ARGS__)
#define SymLog_error(M, ...) SymLog_log(3, __func__, __FILE__, __LINE__, M, ##__VA_ARGS__)

void SymLog_log(LogLevel logLevel, char *functionName, char *filename, int lineNumber, char* message, ...);
void SymLog_log(LogLevel logLevel, const char *functionName, const char *filename, int lineNumber, const char* message, ...);
2 changes: 1 addition & 1 deletion symmetric-client-clib/src/common/SymLog.c
Expand Up @@ -55,7 +55,7 @@ char *generateTimestamp() {
}

/** This is the central place where all logging funnels through. */
void SymLog_log(LogLevel logLevel, char *functionName, char *fileName, int lineNumber, char* message, ...) {
void SymLog_log(LogLevel logLevel, const char *functionName, const char *fileName, int lineNumber, const char* message, ...) {
FILE *destination;
if (logLevel <= INFO) {
destination = stdin;
Expand Down
Expand Up @@ -81,7 +81,7 @@ SymSqlitePlatform * SymSqlitePlatform_new(SymSqlitePlatform *this, SymProperties

if (sqlite3_open_v2(filename, &this->db,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_URI, NULL)) {
SymLog_info(stderr, "Can't open database: %s", sqlite3_errmsg(this->db));
SymLog_info("Can't open database: %s", sqlite3_errmsg(this->db));
sqlite3_close(this->db);
return NULL;
}
Expand Down

0 comments on commit e9bb561

Please sign in to comment.