From 838a8fea28cb3748c7738a03e8ff2cfa52e18b4b Mon Sep 17 00:00:00 2001 From: Marcelo Roberto Jimenez Date: Thu, 18 Nov 2010 13:34:04 -0200 Subject: [PATCH] samples: fix compiler warnings. (cherry picked from commit 2e96edcbc5d8eb7b3a3479b924de119faaecc77b) --- upnp/sample/common/tv_ctrlpt.c | 25 ++++++------------------- upnp/sample/common/tv_ctrlpt.h | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/upnp/sample/common/tv_ctrlpt.c b/upnp/sample/common/tv_ctrlpt.c index 06f7cb3..ee37014 100644 --- a/upnp/sample/common/tv_ctrlpt.c +++ b/upnp/sample/common/tv_ctrlpt.c @@ -800,9 +800,9 @@ void TvStateUpdate(char *UDN, int Service, IXML_Document *ChangedVariables, IXML_NodeList *variables; IXML_Element *property; IXML_Element *variable; - int length; - int length1; - int i; + long unsigned int length; + long unsigned int length1; + long unsigned int i; int j; char *tmpstate = NULL; @@ -1126,23 +1126,10 @@ int TvCtrlPointCallbackEventHandler(Upnp_EventType EventType, void *Event, void Cookie = Cookie; } -/******************************************************************************** - * TvCtrlPointVerifyTimeouts - * - * Description: - * Checks the advertisement each device - * in the global device list. If an advertisement expires, - * the device is removed from the list. If an advertisement is about to - * expire, a search request is sent for that device. - * - * Parameters: - * incr -- The increment to subtract from the timeouts each time the - * function is called. - * - ********************************************************************************/ void TvCtrlPointVerifyTimeouts(int incr) { - struct TvDeviceNode *prevdevnode, *curdevnode; + struct TvDeviceNode *prevdevnode; + struct TvDeviceNode *curdevnode; int ret; ithread_mutex_lock(&DeviceListMutex); @@ -1196,7 +1183,7 @@ void *TvCtrlPointTimerLoop(void *args) int incr = 30; while (TvCtrlPointTimerLoopRun) { - isleep(incr); + isleep((unsigned int)incr); TvCtrlPointVerifyTimeouts(incr); } diff --git a/upnp/sample/common/tv_ctrlpt.h b/upnp/sample/common/tv_ctrlpt.h index b853795..c6ce7e6 100644 --- a/upnp/sample/common/tv_ctrlpt.h +++ b/upnp/sample/common/tv_ctrlpt.h @@ -32,6 +32,10 @@ #ifndef UPNP_TV_CTRLPT_H #define UPNP_TV_CTRLPT_H +/*! + * \file + */ + #ifdef __cplusplus extern "C" { #endif @@ -163,7 +167,20 @@ void TvStateUpdate( void TvCtrlPointHandleEvent(const char *, int, IXML_Document *); void TvCtrlPointHandleSubscribeUpdate(const char *, const Upnp_SID, int); int TvCtrlPointCallbackEventHandler(Upnp_EventType, void *, void *); -void TvCtrlPointVerifyTimeouts(int); + +/*! + * \brief Checks the advertisement each device in the global device list. + * + * If an advertisement expires, the device is removed from the list. + * + * If an advertisement is about to expire, a search request is sent for that + * device. + */ +void TvCtrlPointVerifyTimeouts( + /*! [in] The increment to subtract from the timeouts each time the + * function is called. */ + int incr); + void TvCtrlPointPrintCommands(void); void* TvCtrlPointCommandLoop(void *); int TvCtrlPointStart(print_string printFunctionPtr, state_update updateFunctionPtr, int combo);