[rt-commit] r209 - in /redwax-tool/trunk: ChangeLog redwax_util.c
rt-commit at redwax.eu
rt-commit at redwax.eu
Sat Feb 22 14:30:02 CET 2025
Author: minfrin at redwax.eu
Date: Sat Feb 22 14:30:00 2025
New Revision: 209
Log:
Remove warning pointer of type 'void *' used
in subtraction.
Modified:
redwax-tool/trunk/ChangeLog
redwax-tool/trunk/redwax_util.c
Modified: redwax-tool/trunk/ChangeLog
==============================================================================
--- redwax-tool/trunk/ChangeLog (original)
+++ redwax-tool/trunk/ChangeLog Sat Feb 22 14:30:00 2025
@@ -1,5 +1,8 @@
Changes with v0.9.9
+
+ *) Remove warning pointer of type 'void *' used
+ in subtraction. [Graham Leggett]
*) Refactor long lines. [Graham Leggett]
Modified: redwax-tool/trunk/redwax_util.c
==============================================================================
--- redwax-tool/trunk/redwax_util.c (original)
+++ redwax-tool/trunk/redwax_util.c Sat Feb 22 14:30:00 2025
@@ -1557,11 +1557,9 @@
}
case REDWAX_FORMAT_YAML: {
- void *v = (void *)val;
-
if (object) {
- if (!v) {
+ if (!val) {
const struct iovec vec[] = {
{"\n", 1},
@@ -1585,7 +1583,7 @@
if (APR_SUCCESS == status) {
- void *l = strchr(v, '\n');
+ const char *l = strchr(val, '\n');
if (l) {
@@ -1600,12 +1598,12 @@
const struct iovec vec[] = {
{m->object_prefix, m->prefix_len},
{" ", 2},
- {v, l - v + 1},
+ {(void *)val, l - val + 1},
};
status = m->wv(m->ctx, vec, 3);
- l = strchr((v = l + 1), '\n');
+ l = strchr((val = l + 1), '\n');
};
if (APR_SUCCESS == status) {
@@ -1613,7 +1611,7 @@
const struct iovec vec[] = {
{m->object_prefix, m->prefix_len},
{" ", 2},
- {v, strlen(v)},
+ {(void *)val, strlen(val)},
};
status = m->wv(m->ctx, vec, 3);
@@ -1624,7 +1622,7 @@
else if (APR_SUCCESS == status) {
const struct iovec vec[] = {
- {v, strlen(v)},
+ {(void *)val, strlen(val)},
};
status = m->wv(m->ctx, vec, 1);
@@ -1636,7 +1634,7 @@
}
else if (array) {
- if (!v) {
+ if (!val) {
const struct iovec vec[] = {
{"\n", 1},
@@ -1657,7 +1655,7 @@
if (APR_SUCCESS == status) {
- void *l = strchr(v, '\n');
+ const char *l = strchr(val, '\n');
if (l) {
@@ -1672,12 +1670,12 @@
const struct iovec vec[] = {
{m->object_prefix, m->prefix_len},
{" ", 2},
- {v, l - v + 1},
+ {(void *)val, l - val + 1},
};
status = m->wv(m->ctx, vec, 3);
- l = strchr((v = l + 1), '\n');
+ l = strchr((val = l + 1), '\n');
};
if (APR_SUCCESS == status) {
@@ -1685,7 +1683,7 @@
const struct iovec vec[] = {
{m->object_prefix, m->prefix_len},
{" ", 2},
- {v, strlen(v)},
+ {(void *)val, strlen(val)},
};
status = m->wv(m->ctx, vec, 3);
@@ -1696,7 +1694,7 @@
else if (APR_SUCCESS == status) {
const struct iovec vec[] = {
- {v, strlen(v)},
+ {(void *)val, strlen(val)},
};
status = m->wv(m->ctx, vec, 1);
More information about the rt-commit
mailing list