svn commit: r259193 - head/sbin/hastd
Mikolaj Golub
trociny at FreeBSD.org
Tue Dec 10 20:02:10 UTC 2013
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;
More information about the svn-src-head
mailing list