Skip to content

Resolve sign comparison warning#31

Open
moritz89 wants to merge 1 commit intoimprov-wifi:mainfrom
InamataIO:main
Open

Resolve sign comparison warning#31
moritz89 wants to merge 1 commit intoimprov-wifi:mainfrom
InamataIO:main

Conversation

@moritz89
Copy link
Contributor

Why:

  • Reduce unnecessary warnings

This change addresses the need by:

  • Using unsigned integers for comparisons

closes #30

Why:

- Reduce unnecessary warnings

This change addresses the need by:

- Using unsigned integers for comparisons
// Frame length variable: string lengths: n + length of data in datum
frame_length += datum.size();
for (int i = 0; i < datum.size(); i++) {
for (uint32_t i = 0; i < datum.size(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (uint32_t i = 0; i < datum.size(); i++) {
for (size_t i = 0; i < datum.size(); i++) {

// Frame length variable: string lengths: n + length of data in datum
frame_length += datum.size();
for (int i = 0; i < datum.size(); i++) {
for (uint32_t i = 0; i < datum.size(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (uint32_t i = 0; i < datum.size(); i++) {
for (size_t i = 0; i < datum.size(); i++) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler warnings

2 participants