tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: Signed vs unsigned comparisons in sys/dev/pcio/if_wm.c
> While starting to investigate the possibility of modularizing the
> if_wm(4) driver, I discovered some issues where signed expressions are
> being compared to unsigned expressions. When if_wm.c is being compiled
> as a built-in driver, these errors are ignored. However, when build as
> a loadable module, they are fatal to the build!
>
> There are three instances within if_wm.c where this occurs, at source
> lines 6164, 6688, and 9204 (based on revision 1.443). The attached
> diffs make the compiler happy in both cases (kernel and module).
>
> Is there any reason why these changes should not be committed?
adding "(int)" casts to appease sign compare warnings considered
not worth the churn or ugliness or casts.
we shouldn't use a special warning for module builds, and while i
tend to agree with using more warning messages than fewer, i'm not
convinced this one is worth the casts and beyond churn required.
.mrg.
Home |
Main Index |
Thread Index |
Old Index