summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-08-08 17:36:22 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-08-08 17:36:22 +0000
commit35d2f4c249edbaba8d9290fb9be6752c5f260c27 (patch)
treec9be7459989f2e2b01fc9d65e0573a5bf33419cd /usr.bin/mandoc/mandocdb.c
parent9a30e786020cccf1a93b26dad493cb49e710fc98 (diff)
Absurdly, the return value of sqlite3_column_text()
is "const unsigned char *", which causes warnings with GCC on Linux. Explicitly cast to "const char *" to avoid this. Issue noticed by kristaps@.
Diffstat (limited to 'usr.bin/mandoc/mandocdb.c')
-rw-r--r--usr.bin/mandoc/mandocdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index 30e77a99916..85d78d6a514 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.112 2014/08/08 16:17:09 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.113 2014/08/08 17:36:21 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1299,10 +1299,10 @@ names_check(void)
say("", "%s", sqlite3_errmsg(db));
while (SQLITE_ROW == (irc = sqlite3_step(stmt))) {
- name = sqlite3_column_text(stmt, 0);
- sec = sqlite3_column_text(stmt, 1);
- arch = sqlite3_column_text(stmt, 2);
- key = sqlite3_column_text(stmt, 3);
+ name = (const char *)sqlite3_column_text(stmt, 0);
+ sec = (const char *)sqlite3_column_text(stmt, 1);
+ arch = (const char *)sqlite3_column_text(stmt, 2);
+ key = (const char *)sqlite3_column_text(stmt, 3);
say("", "%s(%s%s%s) lacks mlink \"%s\"", name, sec,
'\0' == *arch ? "" : "/",
'\0' == *arch ? "" : arch, key);