From 1b02d81301eaff67fc9926739336ebdadeb733b3 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 23 Oct 2019 19:57:00 +0100 Subject: [PATCH] WIN32: Disable some fatal compiler warnings. TODO: Fix for real sometime. --- boxx.cc | 5 +++++ dvbsubtitles.cc | 5 +++++ osdvector.cc | 5 +++++ surfacewin.cc | 5 +++++ tcp.cc | 5 ++++- teletextdecodervbiebu.cc | 5 +++++ vepglistadvanced.cc | 5 +++++ videowin.cc | 5 +++++ windowsosd.cc | 5 +++++ 9 files changed, 44 insertions(+), 1 deletion(-) diff --git a/boxx.cc b/boxx.cc index 278747a..73e8171 100644 --- a/boxx.cc +++ b/boxx.cc @@ -294,6 +294,11 @@ int Boxx::drawPara(const char* text, int x, int y, const DrawStyle& colour,unsig int printLine; int leftlines=0; +#if WIN32 + // FIXME win pragma +#pragma warning(disable : 4146) +#endif + int drawLinePos=-skiplines; textPos = 0; diff --git a/dvbsubtitles.cc b/dvbsubtitles.cc index 5351b6f..ff8e4cb 100644 --- a/dvbsubtitles.cc +++ b/dvbsubtitles.cc @@ -935,6 +935,11 @@ void DVBSubtitles::nudge() #define SUBTITLE_TIMEOUT_MS 750 // How often do we check if subtitles have been timed out. +#if WIN32 +// FIXME win pragma +#pragma warning(disable : 4146) +#endif + void DVBSubtitles::threadMethod() { struct timespec sleeptime; diff --git a/osdvector.cc b/osdvector.cc index aab8b17..0ecc7e1 100644 --- a/osdvector.cc +++ b/osdvector.cc @@ -883,6 +883,11 @@ void OsdVector::PictureReader::addStaticImage(unsigned int id) threadSignal(); } +#if WIN32 +// FIXME win pragma +#pragma warning(disable : 4703) +#endif + bool OsdVector::PictureReader::processReceivedPictures() { bool decoded = false; diff --git a/surfacewin.cc b/surfacewin.cc index 302f35c..da1d323 100644 --- a/surfacewin.cc +++ b/surfacewin.cc @@ -185,6 +185,11 @@ void SurfaceWin::drawPixel(int x, int y, Colour & colour, bool fastdraw) { drawPixel(x, y, c, fastdraw); } +#if WIN32 +// FIXME win pragma +#pragma warning(disable : 4703) +#endif + void SurfaceWin::drawPixel(int x, int y, unsigned int c, bool fastdraw) { //FixMe: locking for every single Pixel will be painfully slow diff --git a/tcp.cc b/tcp.cc index 19bfc37..5aff9cf 100644 --- a/tcp.cc +++ b/tcp.cc @@ -115,8 +115,11 @@ void TCP::getMAC(char* dest) int TCP::connectTo(char* host, unsigned short port) { +#ifdef VOMP_PLATTFORM_RASPBERRY #define IPV 6 - +#else +#define IPV 4 +#endif #if IPV == 4 diff --git a/teletextdecodervbiebu.cc b/teletextdecodervbiebu.cc index 0ea194f..d52d3df 100644 --- a/teletextdecodervbiebu.cc +++ b/teletextdecodervbiebu.cc @@ -152,6 +152,11 @@ void TeletextDecoderVBIEBU::PrepareMediaSample(const MediaPacketList& mplist, UI mediapacket = mplist.front(); } +#if WIN32 +// FIXME win pragma +#pragma warning(disable : 4146) +#endif + static ULLONG TxtPTSDifference(ULLONG pts1, ULLONG pts2) { // Assume pts1, pts2 < 2^33; calculate pts1 - pts2 diff --git a/vepglistadvanced.cc b/vepglistadvanced.cc index 42450f8..360798e 100644 --- a/vepglistadvanced.cc +++ b/vepglistadvanced.cc @@ -275,6 +275,11 @@ void VEpgListAdvanced::doSwitch() } } +#if WIN32 +// FIXME win pragma +#pragma warning(disable : 4703) +#endif + void VEpgListAdvanced::doRecord() { int channel; diff --git a/videowin.cc b/videowin.cc index 93637c3..2e73b7e 100644 --- a/videowin.cc +++ b/videowin.cc @@ -80,6 +80,11 @@ VideoWin::VideoWin() videoH264filterselected=-1; OSVERSIONINFO verinfo; verinfo.dwOSVersionInfoSize=sizeof(verinfo); + +#if WIN32 + // FIXME win pragma +#pragma warning(disable : 4996) +#endif GetVersionEx(&verinfo); if (verinfo.dwMajorVersion>=6) { diff --git a/windowsosd.cc b/windowsosd.cc index e01668f..199286d 100644 --- a/windowsosd.cc +++ b/windowsosd.cc @@ -227,6 +227,11 @@ void WindowsOsd::shutdownDirect3D9Objects() if (swappy) swappy->Release(); } +#if WIN32 +// FIXME win pragma +#pragma warning(disable : 4703) +#endif + void WindowsOsd::threadMethod() { while (true) -- 2.39.5