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

MSVC: Fix warning C4133 on x64: "function": Incompatible types - from "unsigned long *" to "size_t *" #5317

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

csware
Copy link
Contributor

@csware csware commented Dec 3, 2019

No description provided.

src/regexp.c Outdated
@@ -78,7 +78,7 @@ int git_regexp_search(const git_regexp *r, const char *string, size_t nmatches,
int git_regexp_compile(git_regexp *r, const char *pattern, int flags)
{
unsigned char errmsg[1024];
unsigned long erroff;
size_t erroff;
Copy link
Member

Choose a reason for hiding this comment

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

Good catch. This should maybe be PCRE2_SIZE per the PCRE2 docs themselves. Will that always be size_t?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's hard-coded in pcre2.h, but I think PCRE2_SIZE is better...

… "unsigned long *" to "size_t *"

Signed-off-by: Sven Strickroth <email@cs-ware.de>
@ethomson
Copy link
Member

ethomson commented Dec 4, 2019

Awesome. Thanks for the fix!

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.

None yet

2 participants