makecdfenv bug
1
0
Entering edit mode
Cyrus Harmon ▴ 140
@cyrus-harmon-1173
Last seen 9.5 years ago
Dear BioC, In the makecdfenv-1.5.1 package there is, I think, a bug in the file read_cdf_xda.c. Starting at line 297, read_cdf_xda.c says: static size_t fread_uchar(unsigned char *destination, int n, FILE *instream){ int i=0; size_t result; result = fread(destination,sizeof(unsigned char),n,instream); #ifdef WORDS_BIGENDIAN /* Probably don't need to do anything for characters */ destination = ~destination; #endif return result; } The assignment destination = ~destination looks bogus to me. And the compiler (gcc 3.3 on OS X 10.4) doesn't like it either, claiming there is an "error: wrong type argument to bit-complement". In similar functions, we're bit-complementing stuff that destination points to. This probably isn't the right thing to do since we probably don't need to do anything for characters (or char's at least) and this line should be commented out. If anything were to need to be done here, setting the pointer to the complement of the pointer is probably not going to do it. But I don't think we need to bit-complement what destination points to either. The following patch at least enables makecdfenv to compile for me: --- read_cdf_xda.c 2005/05/06 23:07:37 1.1 +++ read_cdf_xda.c 2005/05/06 23:07:39 @@ -303,7 +303,7 @@ #ifdef WORDS_BIGENDIAN /* Probably don't need to do anything for characters */ - destination = ~destination; + /* destination = ~destination; */ #endif return result; In the future, should things like this go to the BioC list or to the maintainers of the specific package? Thanks for considering this, Cyrus
GO makecdfenv GO makecdfenv • 818 views
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.5 years ago
Hi Cyrus, Cyrus Harmon <ch-bioc@bobobeach.com> writes: > In the makecdfenv-1.5.1 package there is, I think, a bug in the file > read_cdf_xda.c. Thanks for the report. > The following patch at least enables makecdfenv to compile for me: and the patch! > In the future, should things like this go to the BioC list or to the > maintainers of the specific package? Reports and patches of this nature should be sent to the package maintainer and, if you like, to the bioc-devel list. I like the idea of using the bioc-devel forum for discussion such bugs. I'd like to see the main bioconductor list (this one) remain more oriented toward end users. So, in general, development related questions of a more software engineering nature should be directed to bioc-devel. BTW, thank you for your recent burst of reports and comments. Although we're not always able to be as responsive as we'd like, we really do appreciate such efforts and they are essential to the development of the project. Best, + seth
ADD COMMENT

Login before adding your answer.

Traffic: 730 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6