Skip to content

Mute warning: assigning to 'const char *' from 'const unsigned char *' #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions table_sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ table_sqlite_lookup(int service, struct dict *params, const char *key, char *dst
case K_MAILADDRMAP:
memset(dst, 0, sz);
do {
value = sqlite3_column_text(stmt, 0);
value = (const char *)sqlite3_column_text(stmt, 0);
if (dst[0] && strlcat(dst, ", ", sz) >= sz) {
log_warnx("warn: result too large");
r = -1;
Expand Down Expand Up @@ -393,7 +393,7 @@ table_sqlite_lookup(int service, struct dict *params, const char *key, char *dst
case K_SOURCE:
case K_MAILADDR:
case K_ADDRNAME:
if (strlcpy(dst, sqlite3_column_text(stmt, 0), sz) >= sz) {
if (strlcpy(dst, (const char *)sqlite3_column_text(stmt, 0), sz) >= sz) {
log_warnx("warn: result too large");
r = -1;
}
Expand Down Expand Up @@ -428,7 +428,7 @@ table_sqlite_fetch(int service, struct dict *params, char *dst, size_t sz)
;

while ((s = sqlite3_step(stmt_fetch_source)) == SQLITE_ROW)
dict_set(&sources, sqlite3_column_text(stmt_fetch_source, 0), NULL);
dict_set(&sources, (const char *)sqlite3_column_text(stmt_fetch_source, 0), NULL);

if (s != SQLITE_DONE)
log_warnx("warn: sqlite3_step: %s", sqlite3_errmsg(db));
Expand Down