Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix broken build when MSVC SDL checks is enabled #1569

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
May 11, 2013

Conversation

linquize
Copy link
Contributor

Fix broken build when MSVC SDL checks is enabled
Mostly initialize local variables.

@@ -782,8 +782,12 @@ static bin_tree_t *create_token_tree (re_dfa_t *dfa,
#ifdef DEBUG
/* Note: length+1 will not overflow since it is checked in init_dfa. */
dfa->re_str = re_malloc (char, length + 1);
#if _MSC_VER >= 1400
strncpy_s (dfa->re_str, length + 1, pattern, length + 1);
Copy link
Member

Choose a reason for hiding this comment

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

SDL and DEBUG?

I don't understand the rationale here.

We made a pass to make sure SDL passed (though we did not apply banned.h because, of course, some people run SDL on the binaries they ship. But it doesn't make sense to me to make the DEBUG version SDL compliant. Are you shipping debug DLLs? Are you running SDL on as part of your CI build (and building debug DLLs)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not checking the binaries. I compile from source directly. I am not using CMake, but dragging all the .c into a .vcxproj to compile. SDL is turned on in that .vcxproj

Copy link
Member

Choose a reason for hiding this comment

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

My question is: you're using SDL on debug builds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, SDL, debug build, win32

Copy link
Member

Choose a reason for hiding this comment

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

I'm gonna pass on this change to regcomp, since it's in debug-only code. Can you drop it so I can merge the other fixes? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes to regcomp has been dropped.

@vmg
Copy link
Member

vmg commented May 11, 2013

Thank you!

vmg pushed a commit that referenced this pull request May 11, 2013
Fix broken build when MSVC SDL checks is enabled
@vmg vmg merged commit 7b5bc8f into libgit2:development May 11, 2013
@linquize linquize deleted the msvc-sdl branch May 11, 2013 12:16
@linquize
Copy link
Contributor Author

BTW, where to make changes to regcomp.c?

phatblat pushed a commit to phatblat/libgit2 that referenced this pull request Sep 13, 2014
Fix broken build when MSVC SDL checks is enabled
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