Conversation
Endianness is a relation between multi-byte integers and byte-addressable memory. Beyond byte granularity, it does not apply. The least-significant bit within a byte always stays the least-significant bit within a byte.
|
|
|
Regarding the CLA: This is a trivial contribution, I wish to proceed without CLA. |
I appreciate your willingness to do this, although I'll need to check to see what sort of flexibility we have, institutionally. @dopplershift? @neuschaefer If we are not permitted to skip the CLA (this decision is out of my hands), I will replicate this manually. Thank you! |
|
After taking a further look, this appears to break the test; after reading how the test is performed, I believe that the original form is correct. @neuschaefer did this work for you? And if so, what platform did you test it on? Thanks! |
|
Sure, this is trivial enough to go without CLA. |
Admittedly, I did not test this on a little-endian machine (where the tests previously passed). I did that now, with the following results:
I disagree. Just from the shape of the code alone, It looks a lot like a copy/paste error: printf("\tBig-Endian Int...\t");
if ((retval = nc_put_var(ncid,be_int_varid,idata_in)))
return retval;
if ((retval = nc_get_var(ncid,be_int_varid,idata_be_out)))
// return retval; // this line inserted by me
for(failed=0,i=0;i<NDIM;i++) {if(idata_in[i] != idata_be_out[i]) {printf("failed\n"); failures++; failed++; break;}}
if(!failed) printf("passed\n");The logic, as it was before my patch, amounts to the following:
That the With the I think what happened, instead, is that my fix uncovered a bug in the library, probably the same bug that has been visible on big-endian systems. Because |
|
Taking a look to reconcile the logic and the failing tests. |
edhartnett
left a comment
There was a problem hiding this comment.
These are good changes. Thanks!
|
Failing tests hopefully will be fixed by recent changes plus #3273 |
see individual commits