aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonkeyman_67156 <monkeyman_67156@svn>2010-03-02 04:43:05 +0000
committermonkeyman_67156 <monkeyman_67156@svn>2010-03-02 04:43:05 +0000
commit087c6fb5583a92daf3fc569336477e9ec3d22291 (patch)
tree299cea5f06f90fc62f08136f8eea85b1f9a31ff4
parentd51895e149c64ebfaa14f8fd76e866c454bfa043 (diff)
fixed: compilation warnings in libXDAAP
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28294 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--xbmc/lib/libXDAAP/Authentication/hasher.c4
-rw-r--r--xbmc/lib/libXDAAP/Authentication/hasher.h4
-rw-r--r--xbmc/lib/libXDAAP/daap_readtypes.h22
-rw-r--r--xbmc/lib/libXDAAP/debug.h5
-rw-r--r--xbmc/lib/libXDAAP/libXDAAP.c95
5 files changed, 63 insertions, 67 deletions
diff --git a/xbmc/lib/libXDAAP/Authentication/hasher.c b/xbmc/lib/libXDAAP/Authentication/hasher.c
index f87c7c7e81..89f71db5be 100644
--- a/xbmc/lib/libXDAAP/Authentication/hasher.c
+++ b/xbmc/lib/libXDAAP/Authentication/hasher.c
@@ -175,8 +175,8 @@ static void GenerateStatic_45()
}
void GenerateHash(short version_major,
- const unsigned char *url, unsigned char hashSelect,
- unsigned char *outhash,
+ const char *url, char hashSelect,
+ char *outhash,
int request_id)
{
unsigned char buf[16];
diff --git a/xbmc/lib/libXDAAP/Authentication/hasher.h b/xbmc/lib/libXDAAP/Authentication/hasher.h
index 53b901dd53..1540456cfa 100644
--- a/xbmc/lib/libXDAAP/Authentication/hasher.h
+++ b/xbmc/lib/libXDAAP/Authentication/hasher.h
@@ -27,8 +27,8 @@
#define _HASHER_H
void GenerateHash(short version_major,
- const unsigned char *url, unsigned char hashSelect,
- unsigned char *outhash,
+ const char *url, char hashSelect,
+ char *outhash,
int request_id);
diff --git a/xbmc/lib/libXDAAP/daap_readtypes.h b/xbmc/lib/libXDAAP/daap_readtypes.h
index 522788ee64..6f01888043 100644
--- a/xbmc/lib/libXDAAP/daap_readtypes.h
+++ b/xbmc/lib/libXDAAP/daap_readtypes.h
@@ -53,7 +53,7 @@
}
#endif
-static DMAP_INT8 readBigEndian_INT8(const void *buf, size_t size)
+DMAP_INT8 readBigEndian_INT8(const void *buf, size_t size)
{
/* really int8 will never need alignment, but for constancy.. */
FIXUP_ALIGNMENT(DMAP_INT8);
@@ -61,42 +61,42 @@ static DMAP_INT8 readBigEndian_INT8(const void *buf, size_t size)
return *(DMAP_INT8*)buf;
}
-static DMAP_UINT8 readBigEndian_UINT8(const void *buf, size_t size)
+DMAP_UINT8 readBigEndian_UINT8(const void *buf, size_t size)
{
FIXUP_ALIGNMENT(DMAP_UINT8);
return *(DMAP_UINT8*)buf;
}
-static DMAP_INT16 readBigEndian_INT16(const void *buf, size_t size)
+DMAP_INT16 readBigEndian_INT16(const void *buf, size_t size)
{
FIXUP_ALIGNMENT(DMAP_INT16);
return __Swap16(*(DMAP_INT16*)buf);
}
-static DMAP_UINT16 readBigEndian_UINT16(const void *buf, size_t size)
+DMAP_UINT16 readBigEndian_UINT16(const void *buf, size_t size)
{
FIXUP_ALIGNMENT(DMAP_UINT16);
return __Swap16(*(DMAP_UINT16*)buf);
}
-static DMAP_INT32 readBigEndian_INT32(const void *buf, size_t size)
+DMAP_INT32 readBigEndian_INT32(const void *buf, size_t size)
{
FIXUP_ALIGNMENT(DMAP_INT32);
return __Swap32(*(DMAP_INT32*)buf);
}
-static DMAP_UINT32 readBigEndian_UINT32(const void *buf, size_t size)
+DMAP_UINT32 readBigEndian_UINT32(const void *buf, size_t size)
{
FIXUP_ALIGNMENT(DMAP_UINT32);
return __Swap32(*(DMAP_UINT32*)buf);
}
-static DMAP_INT64 readBigEndian_INT64(const void *buf, size_t size)
+DMAP_INT64 readBigEndian_INT64(const void *buf, size_t size)
{
DMAP_INT64 val;
FIXUP_ALIGNMENT(DMAP_INT64);
@@ -106,7 +106,7 @@ static DMAP_INT64 readBigEndian_INT64(const void *buf, size_t size)
return val;
}
-static DMAP_UINT64 readBigEndian_UINT64(const void *buf, size_t size)
+DMAP_UINT64 readBigEndian_UINT64(const void *buf, size_t size)
{
DMAP_INT64 val;
FIXUP_ALIGNMENT(DMAP_UINT64);
@@ -116,7 +116,7 @@ static DMAP_UINT64 readBigEndian_UINT64(const void *buf, size_t size)
return val;
}
-static dmap_contentCodeFOURCC read_fourcc(const void *buf, size_t size)
+dmap_contentCodeFOURCC read_fourcc(const void *buf, size_t size)
{
const char *c = (char*)buf;
if (size != sizeof(dmap_contentCodeFOURCC))
@@ -124,7 +124,7 @@ static dmap_contentCodeFOURCC read_fourcc(const void *buf, size_t size)
return MAKEFOURCC(c[0], c[1], c[2], c[3]);
}
-static DMAP_VERSION read_version(const void *buf, size_t size)
+DMAP_VERSION read_version(const void *buf, size_t size)
{
DMAP_VERSION v;
if (size != sizeof(DMAP_VERSION))
@@ -135,7 +135,7 @@ static DMAP_VERSION read_version(const void *buf, size_t size)
return v;
}
-static char* read_string_withalloc(const void *buf, size_t size)
+char* read_string_withalloc(const void *buf, size_t size)
{
char *str = (char*)malloc(size + 1);
strncpy(str, (char*)buf, size);
diff --git a/xbmc/lib/libXDAAP/debug.h b/xbmc/lib/libXDAAP/debug.h
index bdd0466ccb..e1ff6ff0d8 100644
--- a/xbmc/lib/libXDAAP/debug.h
+++ b/xbmc/lib/libXDAAP/debug.h
@@ -39,12 +39,7 @@ enum __DEBUG_CLASS
};
/* exported from debug.c */
-#ifdef WIN32
int daap_debug_init(const char *const debug_init_string);
-#else
-// this is a dependency to libsmb. is this by purpose?
-int debug_init(const char *const debug_init_string);
-#endif
int debug_log(enum __DEBUG_CLASS, const char *module,
const char *function,
diff --git a/xbmc/lib/libXDAAP/libXDAAP.c b/xbmc/lib/libXDAAP/libXDAAP.c
index ba94b54cbe..ddec6e5889 100644
--- a/xbmc/lib/libXDAAP/libXDAAP.c
+++ b/xbmc/lib/libXDAAP/libXDAAP.c
@@ -1,15 +1,15 @@
-// Place the code and data below here into the LIBXDAAP section.
+// Place the code and data below here into the LIBXDAAP section.
#ifndef __GNUC__
-#pragma code_seg( "LIBXDAAP_TEXT" )
-#pragma data_seg( "LIBXDAAP_DATA" )
-#pragma bss_seg( "LIBXDAAP_BSS" )
+#pragma code_seg( "LIBXDAAP_TEXT" )
+#pragma data_seg( "LIBXDAAP_DATA" )
+#pragma bss_seg( "LIBXDAAP_BSS" )
#pragma const_seg( "LIBXDAAP_RD" )
-#pragma comment(linker, "/merge:LIBXDAAP_TEXT=LIBXDAAP")
-#pragma comment(linker, "/merge:LIBXDAAP_DATA=LIBXDAAP")
-#pragma comment(linker, "/merge:LIBXDAAP_BSS=LIBXDAAP")
-#pragma comment(linker, "/merge:LIBXDAAP_RD=LIBXDAAP")
-#pragma comment(linker, "/section:LIBXDAAP,RWE")
+#pragma comment(linker, "/merge:LIBXDAAP_TEXT=LIBXDAAP")
+#pragma comment(linker, "/merge:LIBXDAAP_DATA=LIBXDAAP")
+#pragma comment(linker, "/merge:LIBXDAAP_BSS=LIBXDAAP")
+#pragma comment(linker, "/merge:LIBXDAAP_RD=LIBXDAAP")
+#pragma comment(linker, "/section:LIBXDAAP,RWE")
#endif
/* client class
@@ -37,19 +37,19 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
-
-/*
- * Port to XBMC by Forza @ XBMC Media Center Developers
- *
- * XBox modifications (c) 2004 Forza (Chris Barnett)
- *
- */
-
-/*
-
-NOTE: The discovery services have been disabled due to the XBox lacking multicast packets
-
-*/
+
+/*
+ * Port to XBMC by Forza @ XBMC Media Center Developers
+ *
+ * XBox modifications (c) 2004 Forza (Chris Barnett)
+ *
+ */
+
+/*
+
+NOTE: The discovery services have been disabled due to the XBox lacking multicast packets
+
+*/
#include "portability.h"
#include "thread.h"
@@ -61,23 +61,23 @@ NOTE: The discovery services have been disabled due to the XBox lacking multicas
#if defined(SYSTEM_POSIX)
# include "threadpool.h"
#endif
-
-#include "libXDAAP.h"
-#include "client.h"
+
+#include "libXDAAP.h"
+#include "client.h"
//#include "discover.h"
#include "httpClient.h"
-#include "private.h"
-
-#include "daap.h"
+#include "private.h"
+
+#include "daap.h"
#include "daap_contentcodes.h"
#include "dmap_generics.h"
-#include "Authentication/hasher.h"
-
+#include "Authentication/hasher.h"
+
#include "debug.h"
#define DEFAULT_DEBUG_CHANNEL "client"
-
+
static DAAP_SClientHost *DAAP_ClientHost_Create(DAAP_SClient *parent, char *host,
char *sharename);
@@ -97,6 +97,7 @@ struct DAAP_ClientHost_FakeTAG
int marked;
};
+#if !defined(WIN32) && !defined(_LINUX)
static int ClientHasHost_AndMark(DAAP_SClient *pClient, char *sharename)
{
DAAP_ClientHost_Fake *cur_fake = pClient->fakehosts;
@@ -121,7 +122,7 @@ static int ClientHasHost_AndMark(DAAP_SClient *pClient, char *sharename)
}
return 0;
}
-#if !defined(WIN32) && !defined(_LINUX)
+
static void DiscoverCB(SDiscover *disc, void *pv_pClient)
{
DAAP_SClient *pClient = (DAAP_SClient*)pv_pClient;
@@ -1772,7 +1773,7 @@ int DAAP_ClientHost_AsyncStop(DAAP_SClientHost *pCHThis)
/********** update watcher ***********/
static void update_watch_cb(void *pv_pCHThis)
-{
+{
DAAP_SClientHost *pCHThis = (DAAP_SClientHost*)pv_pCHThis;
FIXME("got an update from host %p (%s). Expect brokenness!\n",
pCHThis, pCHThis->sharename_friendly);
@@ -1783,7 +1784,7 @@ static void update_watch_cb(void *pv_pCHThis)
HTTP_Client_WatchQueue_RemoveUpdateWatch(pCHThis->parent->update_watch,
pCHThis->connection);
}
-
+
static void AsyncWaitUpdate(void *pv_pCHThis, void *unused)
{
DAAP_SClientHost *pCHThis = (DAAP_SClientHost*)pv_pCHThis;
@@ -1791,7 +1792,7 @@ static void AsyncWaitUpdate(void *pv_pCHThis, void *unused)
char updateUrl[] = "/update?session-id=%i&revision-number=%i&delta=%i";
char *buf;
TRACE("()\n");
-
+
buf = safe_sprintf(updateUrl, pCHThis->sessionid, pCHThis->revision_number,
pCHThis->revision_number);
GenerateHash(pCHThis->version_major, buf, 2, hash, 0);
@@ -1801,19 +1802,19 @@ static void AsyncWaitUpdate(void *pv_pCHThis, void *unused)
pCHThis->connection, buf, hash,
update_watch_cb,
pv_pCHThis);
-
+
free(buf);
-}
-
+}
+
static void update_watch_runloop(void *pv_pUpdateWatch, void *unused)
-{
+{
HTTP_ConnectionWatch *watch = (HTTP_ConnectionWatch*)pv_pUpdateWatch;
HTTP_Client_WatchQueue_RunLoop(watch);
-}
-
-#ifndef WIN32
+}
+
+#ifndef WIN32
int DAAP_ClientHost_AsyncWaitUpdate(DAAP_SClientHost *pCHThis)
-{
+{
/* lazy create update_watch */
ts_mutex_lock(pCHThis->parent->mtObjectLock);
if (!pCHThis->parent->update_watch)
@@ -1845,11 +1846,11 @@ int DAAP_ClientHost_AsyncWaitUpdate(DAAP_SClientHost *pCHThis)
#error please implement
#endif
return 0;
-}
-#endif
-
+}
+#endif
+
int DAAP_ClientHost_AsyncStopUpdate(DAAP_SClientHost *pCHThis)
-{
+{
/* that's naughty, the app called this without installing a watch */
if (!pCHThis->parent->update_watch) return 0;