Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jan 2012 23:41:32 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r229242 - stable/9/usr.sbin/sa
Message-ID:  <201201012341.q01NfW7A037503@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sun Jan  1 23:41:31 2012
New Revision: 229242
URL: http://svn.freebsd.org/changeset/base/229242

Log:
  MFC r228681:
  
  In usr.sbin/sa/db.c, avoid warnings about assigning two const char
  arrays to non-const void pointers, by casting away const explicitly.

Modified:
  stable/9/usr.sbin/sa/db.c
Directory Properties:
  stable/9/usr.sbin/sa/   (props changed)

Modified: stable/9/usr.sbin/sa/db.c
==============================================================================
--- stable/9/usr.sbin/sa/db.c	Sun Jan  1 23:39:56 2012	(r229241)
+++ stable/9/usr.sbin/sa/db.c	Sun Jan  1 23:41:31 2012	(r229242)
@@ -79,7 +79,7 @@ db_copy_in(DB **mdb, const char *dbname,
 
 	/* 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,
 
 out:
 	/* Add a version record. */
-	key.data = &VERSION_KEY;
+	key.data = (void*)&VERSION_KEY;
 	key.size = sizeof(VERSION_KEY);
 	version = 2;
 	data.data = &version;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201012341.q01NfW7A037503>