Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bar, block, json, sched: fix different signedness comparisons
This fixes 3 comparisons between different signedness integers. The first one is the integer variable used to increment over the blocks in for loops. The number of blocks is defined as an unsigned int in bar.h. Thus, the iterate variable i has to be the same signedness. This commit fixes all declarations of that variable. The second one is the signal type defined in block structure. In C, signal numbers are defined as int. This commit fixes the definition in block.h. The third one is the comparison between the result of snprint()(ie. int) and a sizeof variable (ie. size_t). This comparison requires the int to be casted in unsigned, since the if statement ensures that the value is not negative. This commit casts the int variable in size_t when it is compared to a size_t.
- Loading branch information
Showing
4 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters