Subject: | Quieting warnings on FC5 |
The following diff quiets warnings seen when compiling on Fedora Core 5.
--- Cover.xs.old 2006-08-03 09:19:26.000000000 -0500
+++ Cover.xs 2006-08-03 09:43:21.000000000 -0500
@@ -160,6 +160,7 @@
# endif
#endif
+#ifndef HAS_GETTIMEOFDAY
static int cpu()
{
#ifdef WIN32
@@ -182,7 +183,7 @@
return e / HZ;
}
-
+#endif /* HAS_GETTIMEOFDAY */
#endif /* HAS_TIMES */
static char *get_key(OP *o)
@@ -387,7 +388,6 @@
static OP *get_condition(pTHX)
{
- dMY_CXT;
SV **pc = hv_fetch(Pending_conditionals, get_key(PL_op), CH_SZ, 0);
@@ -419,13 +419,12 @@
* to collect that lost information.
*/
- dMY_CXT;
HE *e;
MUTEX_LOCK(&DC_mutex);
hv_iterinit(Pending_conditionals);
- while (e = hv_iternext(Pending_conditionals))
+ while ((e = hv_iternext(Pending_conditionals)))
{
NDEB(D(L, "finalise_conditions\n"));
add_condition(aTHX_ hv_iterval(Pending_conditionals, e), 0);
@@ -494,13 +493,13 @@
#endif
NDEB(D(L, "cover_logop [%s]\n", get_key(PL_op)));
- if (PL_op->op_type == OP_AND && left_val ||
- PL_op->op_type == OP_ANDASSIGN && left_val ||
- PL_op->op_type == OP_OR && !left_val ||
- PL_op->op_type == OP_ORASSIGN && !left_val ||
+ if ((PL_op->op_type == OP_AND && left_val) ||
+ (PL_op->op_type == OP_ANDASSIGN && left_val) ||
+ (PL_op->op_type == OP_OR && !left_val) ||
+ (PL_op->op_type == OP_ORASSIGN && !left_val) ||
#ifdef KEY_err
- PL_op->op_type == OP_DOR && !left_val_def ||
- PL_op->op_type == OP_DORASSIGN && !left_val_def ||
+ (PL_op->op_type == OP_DOR && !left_val_def) ||
+ (PL_op->op_type == OP_DORASSIGN && !left_val_def) ||
#endif
PL_op->op_type == OP_XOR)
{
@@ -917,7 +916,6 @@
{
IV iv;
char *type;
- dMY_CXT;
iv = PTR2IV(sv);
type = svclassnames[SvTYPE(sv)];
@@ -1042,12 +1040,12 @@
OUTPUT:
RETVAL
-SV *
+void
coverage(final)
unsigned final
PREINIT:
dMY_CXT;
- CODE:
+ PPCODE:
NDEB(D(L, "Getting coverage %d\n", final));
if (final) finalise_conditions(aTHX);
ST(0) = sv_newmortal();