Repository navigation
MNT: Exorcise some compilation warnings in tables - #747
Conversation
| (long)row, (long)first, (long)nelem, buffer, &status); | ||
| for (i = 0; i < nelem; i++) { | ||
| if (buffer[i] == IRAF_INDEFI) { | ||
| if (buffer[i] == (int) IRAF_INDEFI) { |
There was a problem hiding this comment.
@jhunkeler is casting like this safe? It is less disruptive than changing the func sig...
There was a problem hiding this comment.
That's a great question.
In xtables.h:
# define IRAF_INDEFL (0x80000001)
# define IRAF_INDEFI IRAF_INDEFL
I assume this exists as negative value (maybe in general because there's no L suffix on IRAF_INDEFL). What's the expected use case for this define? Casting the value might lead to a change in behavior.
There was a problem hiding this comment.
There are two xtables.h and they are different...
include/xtables.htables/xtables.h
There was a problem hiding this comment.
I am just gonna assume tables/xtables.h is the one used here...
There was a problem hiding this comment.
According to the comment, that block of define is supposed to represent INF in the given data type, so presumably IRAF_INDEFI is meant to be like np.inf for signed integer?
/* Indefinite valued numbers. Taken from IRAF's $hlib/iraf.h */There was a problem hiding this comment.
I don't think I can change buffer data type. It is int. So either I cast RHS to int or we have to find a way to ask compiler to not complain about this line.
There was a problem hiding this comment.
Based on our conversation earlier I think we agreed the cast to int is safe a long as the compiler never stores IRAF_INDEFL as a long type. Otherwise things will get very broken, very quickly.
There was a problem hiding this comment.
If IRAF_INDEFL does get a long type, I hope we would be careful enough to disassociate it from IRAF_INDEFI...
|
The macos queue so slow, do we really need 2 of them? |
|
If I could remove them both I would. Maybe it made sense to have two when one was x86_64 and the other was ARM64. |
|
Turns out macos14 is done anyway, see #754 |
Sequel of #746
A small step towards #35 . Some of the warnings addressed in #746 .
RT: https://github.com/spacetelescope/RegressionTests/actions/runs/42096909896