Fix issue with default unsigned char #1

Merged
igor-hnizdo merged 1 commit from master into master 2022-09-05 04:26:14 -05:00
igor-hnizdo commented 2022-09-04 13:00:43 -05:00 (Migrated from github.com)

For some reason on my distro, char defaults to unsigned,
which breaks getopts if it is returned to char.

I fixed it in the code by changing char to int; but I still slightly worry that
there might be an issue somewhere else.

Anyway changing char to int fixes this and is more "correct" as getopt returns int anyway.

For some reason on my distro, char defaults to unsigned, which breaks getopts if it is returned to char. I fixed it in the code by changing char to int; but I still slightly worry that there might be an issue somewhere else. Anyway changing char to int fixes this and is more "correct" as getopt returns int anyway.
igor-hnizdo commented 2022-09-05 04:06:03 -05:00 (Migrated from github.com)

Aah, it's ARM thing. Yeah getopts fails on ARM because of that.

Related (same issue):

https://github.com/BC-SECURITY/bomutils/pull/2

Aah, it's ARM thing. Yeah getopts fails on ARM because of that. Related (same issue): https://github.com/BC-SECURITY/bomutils/pull/2
igor-hnizdo commented 2022-09-05 04:07:46 -05:00 (Migrated from github.com)

Other fix is to use CFLAGS="-fsigned-char" with configure... but that's probably worse.

Other fix is to use `CFLAGS="-fsigned-char"` with configure... but that's probably worse.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
miles/xar!1
No description provided.