Project "Tuxbox-GIT: apps":
The branch, master has been updated
via 1f417d7035b06cd727b9f156d7627af009ebbbb2 (commit)
from 46ef70fbfbc30a552dc40cdc3f18ea140822f6a0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1f417d7035b06cd727b9f156d7627af009ebbbb2
Author: GetAway <[email protected]>
Date: Sat May 16 17:45:22 2015 +0200
fix strict aliasing warnings
Signed-off-by: GetAway <[email protected]>
diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
index bcaea2b..800b619 100644
--- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
+++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp
@@ -2492,7 +2492,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
else // default: no repeat
rep = (CTimerd::CTimerEventRepeat)0;
if(((int)rep) >= ((int)CTimerd::TIMERREPEAT_WEEKDAYS) &&
!hh->ParamList["wd"].empty())
- NeutrinoAPI->Timerd->getWeekdaysFromStr((int*)&rep,
hh->ParamList["wd"].c_str());
+ NeutrinoAPI->Timerd->getWeekdaysFromStr(&rep,
hh->ParamList["wd"].c_str());
// apids
bool changeApids=false;
diff --git a/tuxbox/neutrino/lib/timerdclient/timerdclient.cpp
b/tuxbox/neutrino/lib/timerdclient/timerdclient.cpp
index eeee6b4..49685f5 100644
--- a/tuxbox/neutrino/lib/timerdclient/timerdclient.cpp
+++ b/tuxbox/neutrino/lib/timerdclient/timerdclient.cpp
@@ -449,22 +449,24 @@ void CTimerdClient::getZaptoSafety(int &pre)
}
//-------------------------------------------------------------------------
-void CTimerdClient::getWeekdaysFromStr(int *rep, const char* str)
+void CTimerdClient::getWeekdaysFromStr(CTimerd::CTimerEventRepeat
*eventRepeat, const char* str)
{
- if(*rep >= (int)CTimerd::TIMERREPEAT_WEEKDAYS)
+ int rep = (int) *eventRepeat;
+ if(rep >= (int)CTimerd::TIMERREPEAT_WEEKDAYS)
{
for(int n=0;n<7;n++)
{
if(str[n]=='X' || str[n]=='x')
{
- *rep |= (1 << (n+9));
+ rep |= (1 << (n+9));
}
else
{
- *rep &= (~(1 << (n+9)));
+ rep &= (~(1 << (n+9)));
}
}
}
+ *eventRepeat = (CTimerd::CTimerEventRepeat) rep;
}
//-------------------------------------------------------------------------
void CTimerdClient::setWeekdaysToStr(CTimerd::CTimerEventRepeat rep, char* str)
diff --git a/tuxbox/neutrino/lib/timerdclient/timerdclient.h
b/tuxbox/neutrino/lib/timerdclient/timerdclient.h
index f35449e..5696c0b 100644
--- a/tuxbox/neutrino/lib/timerdclient/timerdclient.h
+++ b/tuxbox/neutrino/lib/timerdclient/timerdclient.h
@@ -168,7 +168,7 @@ class CTimerdClient:private CBasicClient
void getZaptoSafety(int &pre);
// Convert String of O and X to repeat type and vice versa
- void getWeekdaysFromStr(int *rep, const char* str);
+ void getWeekdaysFromStr(CTimerd::CTimerEventRepeat *rep, const
char* str);
void setWeekdaysToStr(CTimerd::CTimerEventRepeat rep, char*
str);
};
diff --git a/tuxbox/neutrino/src/gui/timerlist.cpp
b/tuxbox/neutrino/src/gui/timerlist.cpp
index 2a88102..fa4ab60 100644
--- a/tuxbox/neutrino/src/gui/timerlist.cpp
+++ b/tuxbox/neutrino/src/gui/timerlist.cpp
@@ -256,7 +256,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string
& actionKey)
{
timerlist[selected].announceTime =
timerlist[selected].alarmTime -60;
if(timerlist[selected].eventRepeat >=
CTimerd::TIMERREPEAT_WEEKDAYS)
- Timer->getWeekdaysFromStr((int
*)&timerlist[selected].eventRepeat, m_weekdaysStr);
+
Timer->getWeekdaysFromStr(&timerlist[selected].eventRepeat, m_weekdaysStr);
if(timerlist[selected].eventType == CTimerd::TIMER_RECORD)
{
timerlist[selected].announceTime -= 120; // 2 more mins
for rec timer
@@ -323,7 +323,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string
& actionKey)
data= timerNew.pluginName;
}
if(timerNew.eventRepeat >= CTimerd::TIMERREPEAT_WEEKDAYS)
- Timer->getWeekdaysFromStr((int *)&timerNew.eventRepeat,
m_weekdaysStr);
+ Timer->getWeekdaysFromStr(&timerNew.eventRepeat,
m_weekdaysStr);
if
(Timer->addTimerEvent(timerNew.eventType,data,timerNew.announceTime,timerNew.alarmTime,
timerNew.stopTime,timerNew.eventRepeat,timerNew.repeatCount,false) == -1)
-----------------------------------------------------------------------
Summary of changes:
.../daemons/nhttpd/tuxboxapi/controlapi.cpp | 2 +-
tuxbox/neutrino/lib/timerdclient/timerdclient.cpp | 10 ++++++----
tuxbox/neutrino/lib/timerdclient/timerdclient.h | 2 +-
tuxbox/neutrino/src/gui/timerlist.cpp | 4 ++--
4 files changed, 10 insertions(+), 8 deletions(-)
--
Tuxbox-GIT: apps
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Tuxbox-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits