Permalink
Browse files

[GH #828] Fix print_n/i and say_n/i void return warnings

  • Loading branch information...
1 parent 3421639 commit 11d0b5dd868639f47e226ae8e551833539864395 Reini Urban committed Dec 8, 2012
Showing with 24 additions and 24 deletions.
  1. +16 −16 src/ops/core_ops.c
  2. +8 −8 src/ops/io.ops
View
@@ -16910,7 +16910,7 @@ Parrot_print_i(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
return cur_opcode + 2;
}
@@ -16926,7 +16926,7 @@ Parrot_print_ic(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
return cur_opcode + 2;
}
@@ -16943,14 +16943,14 @@ Parrot_print_n(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
#if defined(PARROT_HAS_NEGATIVE_ZERO)
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
#else
if ((!Parrot_is_nzero(NREG(1)))) {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
}
else {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0", 2);
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0", 2);
}
#endif
@@ -16971,14 +16971,14 @@ Parrot_print_nc(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
#if defined(PARROT_HAS_NEGATIVE_ZERO)
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
#else
if ((!Parrot_is_nzero(NREG(1)))) {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
}
else {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0", 2);
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0", 2);
}
#endif
@@ -17032,7 +17032,7 @@ Parrot_say_i(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
return cur_opcode + 2;
}
@@ -17048,7 +17048,7 @@ Parrot_say_ic(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
return cur_opcode + 2;
}
@@ -17066,14 +17066,14 @@ Parrot_say_n(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
#if defined(PARROT_HAS_NEGATIVE_ZERO)
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
#else
if ((!Parrot_is_nzero(NREG(1)))) {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
}
else {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0\n", 2);
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0\n", 2);
}
#endif
@@ -17095,14 +17095,14 @@ Parrot_say_nc(opcode_t *cur_opcode, PARROT_INTERP) {
#endif
;
#if defined(PARROT_HAS_NEGATIVE_ZERO)
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
#else
if ((!Parrot_is_nzero(NREG(1)))) {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
}
else {
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0\n", 2);
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0\n", 2);
}
#endif
View
@@ -52,7 +52,7 @@ inline op print(in INT) :base_io {
#else
sprintf(buf, INTVAL_FMT, (INTVAL)$1);
#endif
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
}
inline op print(in NUM) :base_io {
@@ -63,13 +63,13 @@ inline op print(in NUM) :base_io {
sprintf(buf, FLOATVAL_FMT, $1);
#endif
#ifdef PARROT_HAS_NEGATIVE_ZERO
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
#else
if (!Parrot_is_nzero(NREG(1)))
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
else
/* Workaround for older msvcrt and openbsd. GH #366 */
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0", 2);
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0", 2);
#endif
}
@@ -105,7 +105,7 @@ inline op say(in INT) :base_io {
#else
sprintf(buf, INTVAL_FMT "\n", (INTVAL)$1);
#endif
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
}
inline op say(in NUM) :base_io {
@@ -117,13 +117,13 @@ inline op say(in NUM) :base_io {
sprintf(buf, 128, FLOATVAL_FMT, $1);
#endif
#ifdef PARROT_HAS_NEGATIVE_ZERO
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
#else
if (!Parrot_is_nzero(NREG(1)))
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), buf, strlen(buf));
else
/* Workaround for older msvcrt and openbsd. GH #366 */
- Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0\n", 2);
+ (void)Parrot_io_write_b(interp, _PIO_STDOUT(interp), "-0\n", 2);
#endif
}

0 comments on commit 11d0b5d

Please sign in to comment.