Skip to content

Fix warning 'function': incompatible types - from 'git_cvar_value *' to 'int *' (C4133) on VS#4926

Merged
ethomson merged 1 commit intolibgit2:masterfrom
csware:warning-c4133
Jan 9, 2019
Merged

Fix warning 'function': incompatible types - from 'git_cvar_value *' to 'int *' (C4133) on VS#4926
ethomson merged 1 commit intolibgit2:masterfrom
csware:warning-c4133

Conversation

@csware
Copy link
Copy Markdown
Contributor

@csware csware commented Jan 7, 2019

All other places don't use git_cvar_value as type.

@carlosmn
Copy link
Copy Markdown
Member

carlosmn commented Jan 7, 2019

This error message sounds like what MSVC prints when it doesn't know about a type and thus it defaults to int (because of some ancient C rule).

…to 'int *' (C4133) on VS

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

ethomson commented Jan 7, 2019

I'm okay with taking this to squash the warning, but at a glance, I don't know why git_repository__cvar takes an int * not a git_cvar_value * and that seems like a reasonable long-term change.

@ethomson
Copy link
Copy Markdown
Member

ethomson commented Jan 9, 2019

Since this is a config cache, sometimes the values that we're caching are actually ints and not things that map to enums, so actually using git_cvar_value here is not actually appropriate. Merging this, and I'm leaving the rest as-is.

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