Skip to content

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

Merged
ethomson merged 1 commit into
libgit2: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 into
libgit2:masterfrom
csware:warning-c4133

Conversation

@csware

@csware csware commented Jan 7, 2019

Copy link
Copy Markdown
Contributor

All other places don't use git_cvar_value as type.

@carlosmn

carlosmn commented Jan 7, 2019

Copy link
Copy Markdown
Member

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

ethomson commented Jan 7, 2019

Copy link
Copy Markdown
Member

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

ethomson commented Jan 9, 2019

Copy link
Copy Markdown
Member

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