Skip to content

Fixed compiler warning. #265

Merged
merged 1 commit into from
Feb 24, 2021
Merged

Conversation

shitalkumar-gandhi
Copy link

This patch has been added to fix "error: comparison between signed
and unsigned integer expressions [-Werror=sign-compare]"

Signed-off-by: Shitalkumar Gandhi shitalkumar.gandhi@seagate.com

lib/ipmi_tsol.c Outdated
@@ -534,7 +534,7 @@ ipmi_tsol_main(struct ipmi_intf *intf, int argc, char **argv)

if ((fds[0].revents & POLLIN) && (sizeof(out_buff) > out_buff_fill)) {
socklen_t sin_len = sizeof(sin);
int buff_size = sizeof(buff);
unsigned short int buff_size = sizeof(buff);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of sizeof() is size_t, please use it. Please remember that there are different architectures too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of sizeof() is size_t, please use it. Please remember that there are different architectures too.

Thanks, done.

This patch has been added to fix "error: comparison between signed
and unsigned integer expressions [-Werror=sign-compare]"

Signed-off-by: Shitalkumar Gandhi <shitalkumar.gandhi@seagate.com>
@AlexanderAmelkin AlexanderAmelkin merged commit d674bfd into ipmitool:master Feb 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants