svn commit: r277860 - head/usr.sbin/sa
Dimitry Andric
dim at FreeBSD.org
Wed Jan 28 22:22:50 UTC 2015
Author: dim
Date: Wed Jan 28 22:22:49 2015
New Revision: 277860
URL: https://svnweb.freebsd.org/changeset/base/277860
Log:
Fix the following -Wcast-qual warnings in usr.sbin/sa/db.c:
usr.sbin/sa/db.c:82:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual]
key.data = (void*)&VERSION_KEY;
^
usr.sbin/sa/db.c:178:20: error: cast from 'char const (*)[9]' to 'void *' drops const qualifier [-Werror,-Wcast-qual]
key.data = (void*)&VERSION_KEY;
^
Replace the VERSION_KEY define with a writable char array, so no const
qualifier needs to be dropped anymore.
Submitted by: rdivacky
Modified:
head/usr.sbin/sa/db.c
Modified: head/usr.sbin/sa/db.c
==============================================================================
--- head/usr.sbin/sa/db.c Wed Jan 28 21:51:34 2015 (r277859)
+++ head/usr.sbin/sa/db.c Wed Jan 28 22:22:49 2015 (r277860)
@@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
/* Key used to store the version of the database data elements. */
-#define VERSION_KEY "\0VERSION"
+static char VERSION_KEY[] = "\0VERSION";
/*
* Create the in-memory database, *mdb.
More information about the svn-src-all
mailing list