summaryrefslogtreecommitdiff
path: root/src/VBox/ExtPacks
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2016-08-01 15:44:42 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2016-08-01 15:44:42 +0000
commit0f61121abdd15e52996a2f67d10b9ff4d9f28586 (patch)
treec2607e3f91a9c234d576f4de1c70f38c7aac6250 /src/VBox/ExtPacks
parent746cba5655d35a5dd6f363b53d1086970c00732e (diff)
downloadVirtualBox-svn-0f61121abdd15e52996a2f67d10b9ff4d9f28586.tar.gz
ExtPacks/dtrace: warnings
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@62827 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/ExtPacks')
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h1
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c15
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c15
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c2
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c14
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h2
6 files changed, 40 insertions, 9 deletions
diff --git a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h
index d40659322ca..eb045239f33 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceTypes.h
@@ -143,6 +143,7 @@ typedef char *caddr_t;
#define VBDTSTATIC static
#define VBDTUNASS(a_Value) = a_Value
#define VBDTGCC(a_Value) = a_Value
+#define VBDTMSC(a_Value) = a_Value
/*
* string
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c
index 69f17f3492b..a7eaf898cd6 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/dtrace.c
@@ -617,6 +617,7 @@ info_stmt(dtrace_hdl_t *dtp, dtrace_prog_t *pgp,
dtrace_ecbdesc_t *edp = stp->dtsd_ecbdesc;
dtrace_probedesc_t *pdp = &edp->dted_probe;
dtrace_probeinfo_t p;
+ RT_NOREF1(pgp);
if (edp == *last)
return (0);
@@ -743,6 +744,7 @@ static int
list_probe(dtrace_hdl_t *dtp, const dtrace_probedesc_t *pdp, void *arg)
{
dtrace_probeinfo_t p;
+ RT_NOREF1(arg);
oprintf("%5d %10s %17s %33s %s\n", pdp->dtpd_id,
pdp->dtpd_provider, pdp->dtpd_mod, pdp->dtpd_func, pdp->dtpd_name);
@@ -759,6 +761,7 @@ list_stmt(dtrace_hdl_t *dtp, dtrace_prog_t *pgp,
dtrace_stmtdesc_t *stp, dtrace_ecbdesc_t **last)
{
dtrace_ecbdesc_t *edp = stp->dtsd_ecbdesc;
+ RT_NOREF1(pgp);
if (edp == *last)
return (0);
@@ -868,13 +871,16 @@ prochandler(struct ps_prochandle *P, const char *msg, void *arg)
g_pslive--;
break;
}
-#endif /* !VBOX */
+#else
+ RT_NOREF3(P, msg, arg);
+#endif /* VBOX */
}
/*ARGSUSED*/
static int
errhandler(const dtrace_errdata_t *data, void *arg)
{
+ RT_NOREF1(arg);
error(data->dteda_msg);
return (DTRACE_HANDLE_OK);
}
@@ -883,6 +889,7 @@ errhandler(const dtrace_errdata_t *data, void *arg)
static int
drophandler(const dtrace_dropdata_t *data, void *arg)
{
+ RT_NOREF1(arg);
error(data->dtdda_msg);
return (DTRACE_HANDLE_OK);
}
@@ -891,6 +898,7 @@ drophandler(const dtrace_dropdata_t *data, void *arg)
static int
setopthandler(const dtrace_setoptdata_t *data, void *arg)
{
+ RT_NOREF1(arg);
if (strcmp(data->dtsda_option, "quiet") == 0)
g_quiet = data->dtsda_newval != DTRACEOPT_UNSET;
@@ -954,6 +962,7 @@ bufhandler(const dtrace_bufdata_t *bufdata, void *arg)
{ "???", UINT32_MAX },
{ NULL }
};
+ RT_NOREF1(arg);
if (bufdata->dtbda_probe != NULL) {
pd = bufdata->dtbda_probe->dtpda_pdesc;
@@ -1053,6 +1062,7 @@ chewrec(const dtrace_probedata_t *data, const dtrace_recdesc_t *rec, void *arg)
{
dtrace_actkind_t act;
uintptr_t addr;
+ RT_NOREF1(arg);
if (rec == NULL) {
/*
@@ -1083,6 +1093,7 @@ chew(const dtrace_probedata_t *data, void *arg)
dtrace_probedesc_t *pd = data->dtpda_pdesc;
processorid_t cpu = data->dtpda_cpu;
static int heading;
+ RT_NOREF1(arg);
if (g_impatient) {
g_newline = 0;
@@ -1310,7 +1321,7 @@ main(int argc, char *argv[])
RTGetOptInit(&GetState, argc, argv, g_aOptions, RT_ELEMENTS(g_aOptions), 1, 0);
while ((c = RTGetOpt(&GetState, &ValueUnion))) {
{
- const char *optarg = ValueUnion.psz;
+ /* const char *optarg = ValueUnion.psz; - unused */
#endif
switch (c) {
#ifndef VBOX
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c
index 21b2b428db3..cb33f368993 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_aggregate.c
@@ -91,6 +91,7 @@ dt_aggregate_countcmp(int64_t *lhs, int64_t *rhs)
static void
dt_aggregate_min(int64_t *existing, int64_t *new, size_t size)
{
+ RT_NOREF1(size);
if (*new < *existing)
*existing = *new;
}
@@ -99,6 +100,7 @@ dt_aggregate_min(int64_t *existing, int64_t *new, size_t size)
static void
dt_aggregate_max(int64_t *existing, int64_t *new, size_t size)
{
+ RT_NOREF1(size);
if (*new > *existing)
*existing = *new;
}
@@ -140,6 +142,7 @@ dt_aggregate_lquantize(int64_t *existing, int64_t *new, size_t size)
int64_t arg = *existing++;
uint16_t levels = DTRACE_LQUANTIZE_LEVELS(arg);
int i;
+ RT_NOREF1(size);
for (i = 0; i <= levels + 1; i++)
existing[i] = existing[i] + new[i + 1];
@@ -221,7 +224,7 @@ dt_aggregate_quantizedcmp(int64_t *lhs, int64_t *rhs)
{
int nbuckets = DTRACE_QUANTIZE_NBUCKETS, i;
long double ltotal = 0, rtotal = 0;
- int64_t lzero, rzero;
+ int64_t lzero VBDTMSC(0), rzero VBDTMSC(0);
for (i = 0; i < nbuckets; i++) {
int64_t bucketval = DTRACE_QUANTIZE_BUCKETVAL(i);
@@ -277,6 +280,8 @@ dt_aggregate_usym(dtrace_hdl_t *dtp, uint64_t *data)
dt_proc_unlock(dtp, P);
dt_proc_release(dtp, P);
+#else
+ RT_NOREF2(dtp, data);
#endif
}
@@ -302,6 +307,8 @@ dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data)
dt_proc_unlock(dtp, P);
dt_proc_release(dtp, P);
+#else
+ RT_NOREF2(dtp, data);
#endif
}
@@ -574,7 +581,7 @@ hashnext:
return (dt_set_errno(dtp, EDT_NOMEM));
}
- if (j == cpu) {
+ if ((unsigned)j == cpu) {
bcopy(&addr[rec->dtrd_offset],
percpu[j], rec->dtrd_size);
} else {
@@ -815,7 +822,7 @@ dt_aggregate_valcmp(const void *lhs, const void *rhs)
dtrace_aggdesc_t *ragg = rh->dtahe_data.dtada_desc;
caddr_t ldata = lh->dtahe_data.dtada_data;
caddr_t rdata = rh->dtahe_data.dtada_data;
- dtrace_recdesc_t *lrec, *rrec;
+ dtrace_recdesc_t *lrec VBDTMSC(NULL), *rrec VBDTMSC(NULL);
int64_t *laddr, *raddr;
int rval, i;
@@ -1376,7 +1383,7 @@ dtrace_aggregate_walk_joined(dtrace_hdl_t *dtp, dtrace_aggvarid_t *aggvars,
int naggvars, dtrace_aggregate_walk_joined_f *func, void *arg)
{
dt_aggregate_t *agp = &dtp->dt_aggregate;
- dt_ahashent_t *h, **sorted = NULL, ***bundle, **nbundle;
+ dt_ahashent_t *h, **sorted = NULL, ***bundle VBDTMSC(NULL), **nbundle;
const dtrace_aggdata_t **data;
dt_ahashent_t *zaggdata = NULL;
dt_ahash_t *hash = &agp->dtat_hash;
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c
index a90e0f77589..da46659612d 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_as.c
@@ -82,6 +82,7 @@ static int
dt_countvar(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
{
size_t *np = data;
+ RT_NOREF1(dhp);
if (idp->di_flags & (DT_IDFLG_DIFR | DT_IDFLG_DIFW))
(*np)++; /* include variable in vartab */
@@ -97,6 +98,7 @@ dt_copyvar(dt_idhash_t *dhp, dt_ident_t *idp, void *data)
dtrace_difv_t *dvp;
ssize_t stroff;
dt_node_t dn;
+ RT_NOREF1(dhp);
if (!(idp->di_flags & (DT_IDFLG_DIFR | DT_IDFLG_DIFW)))
return (0); /* omit variable from vartab */
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c
index 33dd0a395bc..412964657ee 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dt_cc.c
@@ -138,6 +138,7 @@ static void *dt_compile(dtrace_hdl_t *, int, dtrace_probespec_t, void *,
static int
dt_idreset(dt_idhash_t *dhp, dt_ident_t *idp, void *ignored)
{
+ RT_NOREF2(dhp, ignored);
idp->di_flags &= ~(DT_IDFLG_REF | DT_IDFLG_MOD |
DT_IDFLG_DIFR | DT_IDFLG_DIFW);
return (0);
@@ -147,6 +148,7 @@ dt_idreset(dt_idhash_t *dhp, dt_ident_t *idp, void *ignored)
static int
dt_idpragma(dt_idhash_t *dhp, dt_ident_t *idp, void *ignored)
{
+ RT_NOREF2(dhp, ignored);
yylineno = idp->di_lineno;
xyerror(D_PRAGMA_UNUSED, "unused #pragma %s\n", (char *)idp->di_iarg);
return (0);
@@ -857,6 +859,7 @@ static void
dt_action_symmod_args(dtrace_hdl_t *dtp, dtrace_actdesc_t *ap,
dt_node_t *dnp, dtrace_actkind_t kind)
{
+ RT_NOREF1(dtp);
assert(kind == DTRACEACT_SYM || kind == DTRACEACT_MOD ||
kind == DTRACEACT_USYM || kind == DTRACEACT_UMOD ||
kind == DTRACEACT_UADDR);
@@ -880,6 +883,7 @@ static void
dt_action_ftruncate(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
{
dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+ RT_NOREF1(dnp);
/*
* Library actions need a DIFO that serves as an argument. As
@@ -896,6 +900,7 @@ static void
dt_action_stop(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
{
dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+ RT_NOREF1(dnp);
ap->dtad_kind = DTRACEACT_STOP;
ap->dtad_arg = 0;
@@ -906,6 +911,7 @@ static void
dt_action_breakpoint(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
{
dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+ RT_NOREF1(dnp);
ap->dtad_kind = DTRACEACT_BREAKPOINT;
ap->dtad_arg = 0;
@@ -916,6 +922,7 @@ static void
dt_action_panic(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
{
dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp);
+ RT_NOREF1(dnp);
ap->dtad_kind = DTRACEACT_PANIC;
ap->dtad_arg = 0;
@@ -1094,7 +1101,7 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp)
dt_ident_t *aid, *fid;
dt_node_t *anp, *incr = NULL;
dtrace_actdesc_t *ap;
- uint_t n = 1, argmax;
+ uint_t n = 1, argmax VBDTMSC(0);
uint64_t arg = 0;
/*
@@ -1729,7 +1736,9 @@ err:
free(argv);
(void) fclose(ofp);
return (NULL);
+
#else /* VBOX */
+ RT_NOREF1(ifp);
(void) dt_set_errno(dtp, EDT_CPPERR);
return (NULL);
#endif /* VBOX */
@@ -1990,7 +1999,8 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, const char *path)
while (RT_SUCCESS(RTDirRead(pDir, &DirEntry, 0))) {
struct FakeDirEntry {
const char *d_name;
- } FakeDirEntry = { DirEntry.szName }, *dp = &FakeDirEntry;
+ } FakeDirEntry, *dp = &FakeDirEntry;
+ FakeDirEntry.d_name = DirEntry.szName;
#endif
if ((p = strrchr(dp->d_name, '.')) == NULL || strcmp(p, ".d"))
continue; /* skip any filename not ending in .d */
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h
index 7a419c2c88d..cb253a19b82 100644
--- a/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/lib/libdtrace/common/dtrace.h
@@ -153,7 +153,7 @@ typedef struct dtrace_stmtdesc {
dtrace_actdesc_t *dtsd_action_last; /* last action in action list */
void *dtsd_aggdata; /* aggregation data */
void *dtsd_fmtdata; /* type-specific output data */
- void (*dtsd_callback)(); /* callback function for EPID */
+ void (*dtsd_callback)(void); /* callback function for EPID */
void *dtsd_data; /* callback data pointer */
dtrace_attribute_t dtsd_descattr; /* probedesc attributes */
dtrace_attribute_t dtsd_stmtattr; /* statement attributes */