[Rd] problem with glm (PR#452)

Prof Brian D Ripley ripley@stats.ox.ac.uk
Sun, 20 Feb 2000 08:32:05 +0000 (GMT)


On Sat, 19 Feb 2000, Brad McNeney wrote:

> 
> > If you compile with all warnings on, are you getting warnings on
> > pointer/integer comparisons or assignments?
> > 
> 
> Yes, all the ones in regex.c that Doug mentioned. Here's a sample
> of these and others (warnings related to graphics/X stuff have been
> omitted):

(Two suggestions which are in the current snapshot follow. Looks like
what is which header varies a bit.)

> uncmin.c: In function `lltslv':
> uncmin.c:281: warning: type mismatch in implicit declaration for built-in
> function `memcpy'

Add a line (third one here) to src/include/R_ext/RS.h:

#ifndef R_RS_H
#define R_RS_H

#include <string.h> /* for memcpy */
#include "Rconfig.h" /* for F77_SYMBOL */


> character.c: In function `stripchars':
> character.c:269: warning: subscript has type `char'
> character.c:281: warning: subscript has type `char'
> character.c:296: warning: subscript has type `char'
> character.c:296: warning: subscript has type `char'
> character.c:304: warning: subscript has type `char'
> character.c:312: warning: subscript has type `char'
> character.c:312: warning: subscript has type `char'
> character.c:312: warning: subscript has type `char'
> character.c:320: warning: subscript has type `char'
> character.c:320: warning: subscript has type `char'
> character.c:330: warning: subscript has type `char'
> character.c:330: warning: subscript has type `char'
> character.c:341: warning: subscript has type `char'
> character.c: In function `do_makenames':
> character.c:384: warning: subscript has type `char'
> character.c:395: warning: subscript has type `char'
> /usr/share/misc/bison.simple: In function `Rf_yyparse':
> /usr/share/misc/bison.simple:254: warning: `yyval' might be used
> uninitialized in this function

Those are all normal.

> regex.c: In function `re_match_2':
> regex.c:3770: warning: cast from pointer to integer of different size
> regex.c:3770: warning: cast from pointer to integer of different size

That looks like a regex bug, with a why? comment in the code. Change
(int) to (long), twice.

> regex.c:3776: warning: cast to pointer from integer of different size
> regex.c:3776: warning: cast to pointer from integer of different size
> regex.c:3923: warning: cast to pointer from integer of different size
> regex.c:3923: warning: cast to pointer from integer of different size
> regex.c:3976: warning: cast to pointer from integer of different size
> regex.c:3976: warning: cast to pointer from integer of different size
> regex.c:4082: warning: cast from pointer to integer of different size
> regex.c:4083: warning: cast from pointer to integer of different size
> regex.c:4115: warning: cast to pointer from integer of different size
> regex.c:4115: warning: cast to pointer from integer of different size
> regex.c:4128: warning: cast to pointer from integer of different size
> regex.c:4128: warning: cast to pointer from integer of different size
> regex.c:4296: warning: cast from pointer to integer of different size
> regex.c:4297: warning: cast from pointer to integer of different size

I've never seen those, but try adding

#define STDC_HEADERS 1

at the top of regex.c.  (I am not convinced that is the cause here.)

> saveload.c:495: warning: `BinarySave' defined but not used
> saveload.c:1775: warning: `NewBinarySave' defined but not used

Normal, on a platform with xdr.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._