Skip to content
Browse files

In usr.sbin/sa/db.c, avoid warnings about assigning two const char

arrays to non-const void pointers, by casting away const explicitly.

MFC after:	1 week
  • Loading branch information...
1 parent b4c23c9 commit 1e990b4f956d3f0fecdfc5124609e6e9769bd9b1 @DimitryAndric DimitryAndric committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 usr.sbin/sa/db.c
View
4 usr.sbin/sa/db.c
@@ -79,7 +79,7 @@ db_copy_in(DB **mdb, const char *dbname, const char *uname, BTREEINFO *bti,
/* Obtain/set version. */
version = 1;
- key.data = &VERSION_KEY;
+ key.data = (void*)&VERSION_KEY;
key.size = sizeof(VERSION_KEY);
rv = DB_GET(ddb, &key, &data, 0);
@@ -175,7 +175,7 @@ db_copy_out(DB *mdb, const char *dbname, const char *uname, BTREEINFO *bti)
out:
/* Add a version record. */
- key.data = &VERSION_KEY;
+ key.data = (void*)&VERSION_KEY;
key.size = sizeof(VERSION_KEY);
version = 2;
data.data = &version;

0 comments on commit 1e990b4

Please sign in to comment.
Something went wrong with that request. Please try again.