Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pedatic warnings #247

Merged
merged 3 commits into from
May 27, 2021
Merged

Pedatic warnings #247

merged 3 commits into from
May 27, 2021

Conversation

pablogs9
Copy link
Member

This PR fixes warnings in clang -Wall -Wextra -pedantic-errors

@pablogs9 pablogs9 requested a review from Acuadros95 May 27, 2021 11:17
@@ -73,7 +73,7 @@ int main(
TransportLocator agent_list[MAX_AGENTS];
for (int i = 1; i < args; i += 2, size++)
{
uxr_ip_to_locator(argv[i], (uint16_t)atoi(argv[i + 1]), UXR_IPv4, &agent_list[i++]);
uxr_ip_to_locator(argv[i], (uint16_t)atoi(argv[i + 1]), UXR_IPv4, &agent_list[size]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
uxr_ip_to_locator(argv[i], (uint16_t)atoi(argv[i + 1]), UXR_IPv4, &agent_list[size]);
uxr_ip_to_locator(argv[i], (uint16_t)atoi(argv[i + 1]), UXR_IPv4, &agent_list[size]);
i++;

Missing the deleted increment

Copy link
Member Author

Choose a reason for hiding this comment

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

Is done in the for loop: for (int i = 1; i < args; i += 2, size++)

@richiprosima
Copy link
Contributor

Build status:

  • Linux Build Status
  • Windows Build Status

@pablogs9 pablogs9 requested a review from Acuadros95 May 27, 2021 12:58
@pablogs9 pablogs9 merged commit 4e13268 into develop May 27, 2021
@pablogs9 pablogs9 deleted the feature/fix_warnings_extra branch May 27, 2021 13:16
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.

3 participants