From: Iain Hibbert <[email protected]>
---
obexftp/client.c | 2 +-
obexftp/unicode.c | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/obexftp/client.c b/obexftp/client.c
index b5243e7..e0f494f 100644
--- a/obexftp/client.c
+++ b/obexftp/client.c
@@ -569,7 +569,7 @@ int obexftp_connect_uuid(obexftp_client_t *cli, const char
*device, int port, co
int obexftp_connect_service(obexftp_client_t *cli, const char *src, const char
*device, int port, int service)
{
- uint8_t *uuid = NULL;
+ const uint8_t *uuid = NULL;
uint32_t uuid_len = 0;
if (service == OBEX_FTP_SERVICE) {
uuid = UUID_FBS;
diff --git a/obexftp/unicode.c b/obexftp/unicode.c
index dda8c6d..0c6c935 100644
--- a/obexftp/unicode.c
+++ b/obexftp/unicode.c
@@ -82,8 +82,8 @@ int CharToUnicode(uint8_t *uc, const uint8_t *c, int size)
size_t ni, no, nrc;
int ret;
/* avoid type-punned dereferecing (breaks strict aliasing) */
- char *cc = c;
- char *ucc = uc;
+ const char *cc = (const char *)c;
+ char *ucc = (char *)uc;
return_val_if_fail(uc != NULL, -1);
return_val_if_fail(c != NULL, -1);
@@ -103,8 +103,8 @@ int CharToUnicode(uint8_t *uc, const uint8_t *c, int size)
/* try current locale charset to UTF-16BE */
setlocale(LC_CTYPE, "");
DEBUG(2, "Iconv from locale \"%s\"\n", locale_charset);
- cc = c;
- ucc = uc;
+ cc = (const char *)c;
+ ucc = (char *)uc;
ni = strlen(cc) + 1;
no = size;
utf16 = iconv_open("UTF-16BE", locale_charset);
@@ -117,8 +117,8 @@ int CharToUnicode(uint8_t *uc, const uint8_t *c, int size)
}
/* fallback to ISO-8859-1 to UTF-16BE (every byte is valid here) */
- cc = c;
- ucc = uc;
+ cc = (const char *)c;
+ ucc = (char *)uc;
ni = strlen(cc) + 1;
no = size;
utf16 = iconv_open("UTF-16BE", "ISO-8859-1");
@@ -190,8 +190,8 @@ int UnicodeToChar(uint8_t *c, const uint8_t *uc, int size)
size_t ni, no, nrc;
int ret;
/* avoid type-punned dereferecing (breaks strict aliasing) */
- char *cc = c;
- char *ucc = uc;
+ char *cc = (char *)c;
+ const char *ucc = (const char *)uc;
return_val_if_fail(uc != NULL, -1);
return_val_if_fail(c != NULL, -1);
@@ -265,8 +265,8 @@ int Utf8ToChar(uint8_t *c, const uint8_t *uc, int size)
size_t ni, no, nrc;
int ret;
/* avoid type-punned dereferecing (breaks strict aliasing) */
- char *cc = c;
- char *ucc = uc;
+ char *cc = (char *)c;
+ const char *ucc = (const char *)uc;
return_val_if_fail(uc != NULL, -1);
return_val_if_fail(c != NULL, -1);
--
1.7.4.1
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users