Skip to content

Commit

Permalink
Merge pull request #11010 from notspiff/quell_them_warnings
Browse files Browse the repository at this point in the history
Quell some warnings
  • Loading branch information
hudokkow committed Nov 30, 2016
2 parents 19a13a8 + 5d06907 commit 9dd0a07
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 20 deletions.
8 changes: 4 additions & 4 deletions lib/addons/library.kodi.guilib/libKODI_guilib.cpp
Expand Up @@ -957,14 +957,14 @@ DLLEXPORT bool GUI_control_rendering_dirty(GUIHANDLE handle)
}

CAddonGUIRenderingControl::CAddonGUIRenderingControl(void *hdl, void *cb, CAddonGUIWindow *window, int controlId)
: m_Window(window)
, m_Handle(hdl)
, m_cb(cb)
, m_cbhdl(nullptr)
: m_cbhdl(nullptr)
, CBCreate(nullptr)
, CBRender(nullptr)
, CBStop(nullptr)
, CBDirty(nullptr)
, m_Window(window)
, m_Handle(hdl)
, m_cb(cb)
{
m_RenderingHandle = ((CB_GUILib*)m_cb)->Window_GetControl_RenderAddon(((AddonCB*)m_Handle)->addonData, m_Window->m_WindowHandle, controlId);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/libexif/ExifParse.cpp
Expand Up @@ -198,9 +198,9 @@ static void ErrNonfatal(const char* const msg, int a1, int a2)
//--------------------------------------------------------------------------
// Constructor.
//--------------------------------------------------------------------------
CExifParse::CExifParse () : m_FocalPlaneXRes(0.0),
m_FocalPlaneUnits(0.0), m_ExifImageWidth(0), m_MotorolaOrder(false),
m_DateFound(false), m_LargestExifOffset(0), m_ExifInfo(nullptr)
CExifParse::CExifParse () : m_ExifInfo(nullptr),
m_FocalPlaneUnits(0.0), m_LargestExifOffset(0),
m_ExifImageWidth(0), m_MotorolaOrder(false), m_DateFound(false)
{}

//--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tools/depends/native/TexturePacker/src/md5.cpp
Expand Up @@ -59,7 +59,7 @@ byteSwap(uint32_t *buf, unsigned words)
static void
MD5Transform(uint32_t buf[4], uint32_t const in[16])
{
register uint32_t a, b, c, d;
uint32_t a, b, c, d;

a = buf[0];
b = buf[1];
Expand Down
2 changes: 1 addition & 1 deletion xbmc-xrandr.c
Expand Up @@ -2859,7 +2859,7 @@ main (int argc, char **argv)
nelements = 1;
format = 32;
}
else if ((type == XA_ATOM))
else if (type == XA_ATOM)
{
ulong_value = XInternAtom (dpy, prop->value, False);
data = (unsigned char *) &ulong_value;
Expand Down
Expand Up @@ -120,7 +120,7 @@ void CDVDVideoCodecFFmpeg::CDropControl::Process(int64_t pts, bool drop)
m_diffPTS = m_diffPTS / m_count;
if (m_diffPTS > 0)
{
CLog::Log(LOGNOTICE, "CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: %lld", m_diffPTS);
CLog::Log(LOGNOTICE, "CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: %" PRId64, m_diffPTS);
m_state = CDropControl::VALID;
m_count = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/events/BaseEvent.cpp
Expand Up @@ -113,5 +113,5 @@ std::string CBaseEvent::VariantToLocalizedString(const CVariant& variant)
void CBaseEvent::ToSortable(SortItem& sortable, Field field) const
{
if (field == FieldDate)
sortable[FieldDate] = StringUtils::Format("%020llu", m_timestamp);
sortable[FieldDate] = StringUtils::Format("%020" PRIu64, m_timestamp);
}
2 changes: 1 addition & 1 deletion xbmc/filesystem/PipeFile.cpp
Expand Up @@ -163,7 +163,7 @@ bool CPipeFile::Rename(const CURL& url, const CURL& urlnew)
return false;
}

int CPipeFile::IoControl(int request, void* param)
int CPipeFile::IoControl(EIoControl, void* param)
{
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/filesystem/PipeFile.h
Expand Up @@ -61,7 +61,7 @@ class CPipeFile : public IFile, public IPipeListener

virtual bool Delete(const CURL& url);
virtual bool Rename(const CURL& url, const CURL& urlnew);
virtual int IoControl(int request, void* param);
virtual int IoControl(EIoControl request, void* param);

std::string GetName() const;

Expand Down
2 changes: 1 addition & 1 deletion xbmc/filesystem/RarFile.cpp
Expand Up @@ -275,7 +275,7 @@ int CRarFile::Stat(const CURL& url, struct __stat64* buffer)
return -1;
}

bool CRarFile::OpenForWrite(const CURL& url)
bool CRarFile::OpenForWrite(const CURL&, bool)
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion xbmc/filesystem/RarFile.h
Expand Up @@ -77,7 +77,7 @@ namespace XFILE
virtual void Close();
virtual void Flush();

virtual bool OpenForWrite(const CURL& url);
virtual bool OpenForWrite(const CURL& url, bool);
unsigned int Write(void *lpBuf, int64_t uiBufSize);

protected:
Expand Down
2 changes: 1 addition & 1 deletion xbmc/network/linux/ZeroconfAvahi.h
Expand Up @@ -73,7 +73,7 @@ class CZeroconfAvahi : public CZeroconf

//helper struct for holding information about creating a service / AvahiEntryGroup
//we have to hold that as it's needed to recreate the service
class ServiceInfo;
struct ServiceInfo;
typedef std::map<std::string, std::shared_ptr<ServiceInfo> > tServiceMap;

//goes through a list of todos and publishs them (takes the client a param, as it might be called from
Expand Down
2 changes: 1 addition & 1 deletion xbmc/programs/GUIWindowPrograms.cpp
Expand Up @@ -139,7 +139,7 @@ bool CGUIWindowPrograms::Update(const std::string &strDirectory, bool updateFilt
return true;
}

bool CGUIWindowPrograms::OnPlayMedia(int iItem)
bool CGUIWindowPrograms::OnPlayMedia(int iItem, const std::string&)
{
if ( iItem < 0 || iItem >= (int)m_vecItems->Size() ) return false;
CFileItemPtr pItem = m_vecItems->Get(iItem);
Expand Down
2 changes: 1 addition & 1 deletion xbmc/programs/GUIWindowPrograms.h
Expand Up @@ -35,7 +35,7 @@ class CGUIWindowPrograms :
protected:
virtual void OnItemLoaded(CFileItem* pItem) override {};
virtual bool Update(const std::string& strDirectory, bool updateFilterPath = true) override;
virtual bool OnPlayMedia(int iItem);
bool OnPlayMedia(int iItem, const std::string& = "") override;
virtual void GetContextButtons(int itemNumber, CContextButtons &buttons) override;
virtual bool OnContextButton(int itemNumber, CONTEXT_BUTTON button) override;
bool OnAddMediaSource() override;
Expand Down
4 changes: 2 additions & 2 deletions xbmc/utils/StringUtils.cpp
Expand Up @@ -1314,9 +1314,9 @@ uint64_t StringUtils::ToUint64(std::string str, uint64_t fallback) noexcept

std::string StringUtils::FormatFileSize(uint64_t bytes)
{
const std::array<std::string, 6> units{"B", "kB", "MB", "GB", "TB", "PB"};
const std::array<std::string, 6> units{{"B", "kB", "MB", "GB", "TB", "PB"}};
if (bytes < 1000)
return Format("%lluB", bytes);
return Format("%" PRIu64 "B", bytes);

int i = 0;
double value = static_cast<double>(bytes);
Expand Down
2 changes: 2 additions & 0 deletions xbmc/utils/Variant.cpp
Expand Up @@ -328,6 +328,8 @@ void CVariant::cleanup()
delete m_data.map;
m_data.map = nullptr;
break;
default:
break;
}
m_type = VariantTypeNull;
}
Expand Down

0 comments on commit 9dd0a07

Please sign in to comment.