Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Dec 2013 20:02:09 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r259193 - head/sbin/hastd
Message-ID:  <201312102002.rBAK29nF096921@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Tue Dec 10 20:02:09 2013
New Revision: 259193
URL: http://svnweb.freebsd.org/changeset/base/259193

Log:
  Fix compiler warnings.
  
  MFC after:	2 weeks

Modified:
  head/sbin/hastd/nv.c
  head/sbin/hastd/proto.c

Modified: head/sbin/hastd/nv.c
==============================================================================
--- head/sbin/hastd/nv.c	Tue Dec 10 19:58:10 2013	(r259192)
+++ head/sbin/hastd/nv.c	Tue Dec 10 20:02:09 2013	(r259193)
@@ -566,7 +566,7 @@ nv_get_string(struct nv *nv, const char 
 		return (NULL);
 	PJDLOG_ASSERT((nvh->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST);
 	PJDLOG_ASSERT(nvh->nvh_dsize >= 1);
-	str = NVH_DATA(nvh);
+	str = (char *)NVH_DATA(nvh);
 	PJDLOG_ASSERT(str[nvh->nvh_dsize - 1] == '\0');
 	PJDLOG_ASSERT(strlen(str) == nvh->nvh_dsize - 1);
 	return (str);

Modified: head/sbin/hastd/proto.c
==============================================================================
--- head/sbin/hastd/proto.c	Tue Dec 10 19:58:10 2013	(r259192)
+++ head/sbin/hastd/proto.c	Tue Dec 10 20:02:09 2013	(r259193)
@@ -298,8 +298,8 @@ proto_connection_send(const struct proto
 	protoname = mconn->pc_proto->prt_name;
 	PJDLOG_ASSERT(protoname != NULL);
 
-	ret = conn->pc_proto->prt_send(conn->pc_ctx, protoname,
-	    strlen(protoname) + 1, fd);
+	ret = conn->pc_proto->prt_send(conn->pc_ctx,
+	    (const unsigned char *)protoname, strlen(protoname) + 1, fd);
 	proto_close(mconn);
 	if (ret != 0) {
 		errno = ret;
@@ -325,7 +325,7 @@ proto_connection_recv(const struct proto
 
 	bzero(protoname, sizeof(protoname));
 
-	ret = conn->pc_proto->prt_recv(conn->pc_ctx, protoname,
+	ret = conn->pc_proto->prt_recv(conn->pc_ctx, (unsigned char *)protoname,
 	    sizeof(protoname) - 1, &fd);
 	if (ret != 0) {
 		errno = ret;



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