From e41b2074536932a63d559b245f080638b7e1dc29 Mon Sep 17 00:00:00 2001 From: Dan Kelley Date: Fri, 25 May 2012 10:59:06 -0300 Subject: [PATCH] remove 2 warnings from windows --- src/misc.c | 4 ++-- src/trap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc.c b/src/misc.c index fb5b04b34c..e361426a85 100644 --- a/src/misc.c +++ b/src/misc.c @@ -91,7 +91,7 @@ SEXP bisect_d(SEXP x, SEXP find, SEXP side) break; } /* in left half */ - if (px[left] <= this_find & (this_find < px[middle])) { + if ((px[left] <= this_find) & (this_find < px[middle])) { #ifdef debug Rprintf("L %d %d\n", left, middle); #endif @@ -109,7 +109,7 @@ SEXP bisect_d(SEXP x, SEXP find, SEXP side) } } /* in right half */ - if (px[middle] < this_find & (this_find <= px[right])) { + if ((px[middle] < this_find) & (this_find <= px[right])) { #ifdef debug Rprintf("R %d %d %f %f\n", middle, right, px[middle], px[right]); #endif diff --git a/src/trap.c b/src/trap.c index 40ac656b4e..af7c9ffa0a 100644 --- a/src/trap.c +++ b/src/trap.c @@ -20,7 +20,7 @@ SEXP trap(SEXP x, SEXP y, SEXP type) if ((nx > 1) && nx != ny) error("lengths of x (%d) and y (%d) must match", nx, ny); double *xp = REAL(x), *yp = REAL(y); - double dx; + double dx = 1.0; if (nx == 1) dx = *xp; int *typep = INTEGER(type);