Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132903622
D31306.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D31306.id.diff
View Options
diff --git a/lib/libvmmapi/Makefile b/lib/libvmmapi/Makefile
--- a/lib/libvmmapi/Makefile
+++ b/lib/libvmmapi/Makefile
@@ -5,8 +5,6 @@
SRCS= vmmapi.c vmmapi_freebsd.c
INCS= vmmapi.h
-WARNS?= 2
-
LIBADD= util
CFLAGS+= -I${.CURDIR}
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c
--- a/lib/libvmmapi/vmmapi.c
+++ b/lib/libvmmapi/vmmapi.c
@@ -111,7 +111,7 @@
/* Try to load vmm(4) module before creating a guest. */
if (modfind("vmm") < 0)
kldload("vmm");
- return (CREATE((char *)name));
+ return (CREATE(name));
}
struct vmctx *
@@ -153,14 +153,14 @@
}
int
-vm_parse_memsize(const char *optarg, size_t *ret_memsize)
+vm_parse_memsize(const char *opt, size_t *ret_memsize)
{
char *endptr;
size_t optval;
int error;
- optval = strtoul(optarg, &endptr, 0);
- if (*optarg != '\0' && *endptr == '\0') {
+ optval = strtoul(opt, &endptr, 0);
+ if (*opt != '\0' && *endptr == '\0') {
/*
* For the sake of backward compatibility if the memory size
* specified on the command line is less than a megabyte then
@@ -171,7 +171,7 @@
*ret_memsize = optval;
error = 0;
} else
- error = expand_number(optarg, ret_memsize);
+ error = expand_number(opt, ret_memsize);
return (error);
}
@@ -729,7 +729,7 @@
}
int
-vm_apicid2vcpu(struct vmctx *ctx, int apicid)
+vm_apicid2vcpu(struct vmctx *ctx __unused, int apicid)
{
/*
* The apic id associated with the 'vcpu' has the same numerical value
@@ -907,7 +907,7 @@
{
int i;
- for (i = 0; i < nitems(capstrmap); i++) {
+ for (i = 0; i < (int)nitems(capstrmap); i++) {
if (strcmp(capstrmap[i], capname) == 0)
return (i);
}
@@ -918,7 +918,7 @@
const char *
vm_capability_type2name(int type)
{
- if (type >= 0 && type < nitems(capstrmap))
+ if (type >= 0 && type < (int)nitems(capstrmap))
return (capstrmap[type]);
return (NULL);
@@ -1366,8 +1366,8 @@
int *fault)
{
void *va;
- uint64_t gpa;
- int error, i, n, off;
+ uint64_t gpa, off;
+ int error, i, n;
for (i = 0; i < iovcnt; i++) {
iov[i].iov_base = 0;
@@ -1381,7 +1381,7 @@
return (error);
off = gpa & PAGE_MASK;
- n = min(len, PAGE_SIZE - off);
+ n = MIN(len, PAGE_SIZE - off);
va = vm_map_gpa(ctx, gpa, n);
if (va == NULL)
@@ -1399,14 +1399,14 @@
}
void
-vm_copy_teardown(struct vmctx *ctx, int vcpu, struct iovec *iov, int iovcnt)
+vm_copy_teardown(struct vmctx *ctx __unused, int vcpu __unused,
+ struct iovec *iov __unused, int iovcnt __unused)
{
-
- return;
}
void
-vm_copyin(struct vmctx *ctx, int vcpu, struct iovec *iov, void *vp, size_t len)
+vm_copyin(struct vmctx *ctx __unused, int vcpu __unused, struct iovec *iov,
+ void *vp, size_t len)
{
const char *src;
char *dst;
@@ -1426,8 +1426,8 @@
}
void
-vm_copyout(struct vmctx *ctx, int vcpu, const void *vp, struct iovec *iov,
- size_t len)
+vm_copyout(struct vmctx *ctx __unused, int vcpu __unused, const void *vp,
+ struct iovec *iov, size_t len)
{
const char *src;
char *dst;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 22, 1:03 AM (3 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24035266
Default Alt Text
D31306.id.diff (2 KB)
Attached To
Mode
D31306: libvmmapi: Fix warnings and stop overridding WARNS
Attached
Detach File
Event Timeline
Log In to Comment