Skip to content

Fix typing in signed/unsigned comparison #1039

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

Merged
merged 1 commit into from
Jul 3, 2017

Conversation

tautschnig
Copy link
Collaborator

No description provided.

@@ -45,7 +45,7 @@ int my_mkstemps(char *template_str, int suffix_len)

std::size_t template_length=strlen(template_str);

if(suffix_len+6>template_length)
if(static_cast<std::size_t>(suffix_len+6)>template_length)
Copy link
Member

Choose a reason for hiding this comment

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

one could imagine a PRECONDITION(suffix_len>=1) or so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have added a check suffix_len<0 as used by glibc.

@peterschrammel peterschrammel self-requested a review June 25, 2017 15:20
@kroening kroening merged commit e1c313d into diffblue:master Jul 3, 2017
@tautschnig tautschnig deleted the signed-unsigned branch July 3, 2017 07:07
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