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

fix some warnings concerning type mismatches #7352

Merged
merged 1 commit into from Jul 3, 2015

Conversation

Projects
None yet
4 participants
@Montellese
Member

Montellese commented Jun 28, 2015

This fixes a few warnings concerning type mismatch / potential loss of data.

@@ -711,7 +711,7 @@ void CPVRGUIInfo::UpdateBackendCache(void)
{
CSingleLock lock(m_critSection);
if (m_iAddonInfoToggleCurrent >= iActiveClients)
if (m_iAddonInfoToggleCurrent >= static_cast<unsigned int>(iActiveClients))

This comment has been minimized.

@Jalle19

Jalle19 Jun 28, 2015

Member

Could you drop this one? We have a PR pending which gets rid of this variable completely.

@@ -515,7 +515,7 @@ JSONRPC_STATUS CAudioLibrary::SetSongDetails(const std::string &method, ITranspo
if (ParameterNotNull(parameterObject, "musicbrainztrackid"))
song.strMusicBrainzTrackID = parameterObject["musicbrainztrackid"].asString();
if (ParameterNotNull(parameterObject, "playcount"))
song.iTimesPlayed = parameterObject["playcount"].asInteger();
song.iTimesPlayed = static_cast<int>(parameterObject["playcount"].asInteger());

This comment has been minimized.

@Jalle19

Jalle19 Jun 28, 2015

Member

Why does something from asInteger() have to be casted to int?

This comment has been minimized.

@Montellese

Montellese Jun 28, 2015

Member

Because it returns an int64_t and storing an int64_t into an int potentially leads to loss of data.

This comment has been minimized.

@Jalle19

Jalle19 Jun 28, 2015

Member

Okay. Maybe we should add additional as() methods instead?

This comment has been minimized.

@Montellese

Montellese Jun 28, 2015

Member

Yes that could be done as a separate PR.

@Montellese

This comment has been minimized.

Member

Montellese commented Jun 28, 2015

Dropped the change in CPVRGUIInfo as requested by @Jalle19.

@Montellese Montellese added the Cleanup label Jun 28, 2015

@Montellese

This comment has been minimized.

Member

Montellese commented Jun 30, 2015

jenkins build this please

@Montellese

This comment has been minimized.

Member

Montellese commented Jul 1, 2015

Only some binary addons that failed to build.

@Montellese

This comment has been minimized.

Member

Montellese commented Jul 3, 2015

Good to go?

@Montellese Montellese added this to the Isengard 16.0-alpha1 milestone Jul 3, 2015

@mkortstiege

This comment has been minimized.

Member

mkortstiege commented Jul 3, 2015

jenkins build and merge

@jenkins4kodi jenkins4kodi merged commit 7d8fa88 into xbmc:master Jul 3, 2015

1 check was pending

default Merged build started.
Details

@Montellese Montellese deleted the Montellese:fix_some_warnings branch Jul 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment