-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type of internal struct member causes lots of sign conversion warnings #2780
Comments
I think this is a reasonable change. I will put up a PR for it. |
re: Unidata#2780 As noted in the above issue, changing the NC_OBJ.id field type from size_t to int reduces irrelevant warning. There is no semantic effect since the number of distinct ids will never approach the max positive integer value. Note that this could change in the future if the id becomes more than a simple counter.
See PR #2781 |
There's quite a few other internal structs with similar issues. Would it make sense to move to try and consistently use |
Replacing |
In current
main
, there is a struct which is used as a header for many other objects:Here,
id
is asize_t
, but in many places it's used or passed to anint
. In fact, a quick grep shows it's used in ~240 places and it generates ~120 warnings. Switching it to anint
only generates 5 warnings.I think it's mostly used to store and look up various object IDs which are almost always
int
(at least in the public API), so perhaps that makes more sense?The text was updated successfully, but these errors were encountered: