Fix Wsign-compare in darwin platform code #548

Closed
opened 2024-10-14 23:44:31 +00:00 by jade · 1 comment
Owner

Found while compiling HEAD as of this writing with nixos unstable.

lix> ../src/libstore/platform/darwin.cc:23:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
lix>     while (pidBufSize > pids.size() * sizeof(int)) {
lix>            ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
lix> ../src/libstore/platform/darwin.cc:57:30: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
lix>             while (fdBufSize > fds.size() * sizeof(struct proc_fdinfo)) {
lix>                    ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lix> 2 warnings generated.
Found while compiling HEAD as of this writing with nixos unstable. ``` lix> ../src/libstore/platform/darwin.cc:23:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] lix> while (pidBufSize > pids.size() * sizeof(int)) { lix> ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ lix> ../src/libstore/platform/darwin.cc:57:30: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] lix> while (fdBufSize > fds.size() * sizeof(struct proc_fdinfo)) { lix> ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lix> 2 warnings generated. ```
jade added the
devx
E/easy
E/help wanted
OS/macOS
labels 2024-10-14 23:44:31 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2091 ("libstore: fix sign comparison warnings in darwin platform")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2091", "number": 2091, "kind": "commit message"}], "cl_meta": {"2091": {"change_title": "libstore: fix sign comparison warnings in darwin platform"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2091](https://gerrit.lix.systems/c/lix/+/2091) ("libstore: fix sign comparison warnings in darwin platform")
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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: lix-project/lix#548
No description provided.