Misc compiler warning fixes in lib/libc
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 33776 Build 30995: arc lint + arc unit
Event Timeline
| lib/libc/gen/auxv.c | ||
|---|---|---|
| 270 | Shouldn't we declare buflen to be a size_t instead? | |
| lib/libc/gen/auxv.c | ||
|---|---|---|
| 270 | Can't, because _elf_aux_info must have the same signature as elf_aux_info | |
| lib/libc/gen/auxv.c | ||
|---|---|---|
| 270 | Then maybe we should widen buflen to size_t instead of narrowing the return value of strlcpy. | |
Comment Actions
btw, the rest of the changes look totally fine. Sorry to be so nitpicky over this one...
| lib/libc/gen/auxv.c | ||
|---|---|---|
| 270 | and do we need to make sure buflen isn't less than zero? | |
| lib/libc/gen/auxv.c | ||
|---|---|---|
| 270 | I would've perhaps opted to just widen it for this one comparison after checking that it's not negative above, but I think it's fine either way. | |