diff options
author | joerg <joerg@pkgsrc.org> | 2011-07-21 15:35:55 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2011-07-21 15:35:55 +0000 |
commit | 46d38d0ff99f698cac7c35bf13b344b42cf64c68 (patch) | |
tree | c8c318a9c378ee5f64d0ec5b073c10ba47fb8316 /comms/libopensync | |
parent | 5b4c6ef36dc25c588f92a1250cf90771a37d31a4 (diff) | |
download | pkgsrc-46d38d0ff99f698cac7c35bf13b344b42cf64c68.tar.gz |
Fix a bunch of real world bugs that clang warns about. Fix up fix for
ctype usage to actually do the right thing, not just stop the warning.
Bump revision.
Diffstat (limited to 'comms/libopensync')
-rw-r--r-- | comms/libopensync/Makefile | 4 | ||||
-rw-r--r-- | comms/libopensync/distinfo | 5 | ||||
-rw-r--r-- | comms/libopensync/patches/patch-aa | 37 | ||||
-rw-r--r-- | comms/libopensync/patches/patch-af | 13 |
4 files changed, 48 insertions, 11 deletions
diff --git a/comms/libopensync/Makefile b/comms/libopensync/Makefile index 7527c98bf52..ab69d8d53c7 100644 --- a/comms/libopensync/Makefile +++ b/comms/libopensync/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.7 2011/06/10 09:39:44 obache Exp $ +# $NetBSD: Makefile,v 1.8 2011/07/21 15:35:55 joerg Exp $ # DISTNAME= libopensync-0.22 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= comms MASTER_SITES= http://www.opensync.org/download/releases/0.22/ EXTRACT_SUFX= .tar.bz2 diff --git a/comms/libopensync/distinfo b/comms/libopensync/distinfo index aec64d576d6..bae629675ca 100644 --- a/comms/libopensync/distinfo +++ b/comms/libopensync/distinfo @@ -1,10 +1,11 @@ -$NetBSD: distinfo,v 1.4 2009/01/10 22:08:46 wiz Exp $ +$NetBSD: distinfo,v 1.5 2011/07/21 15:35:55 joerg Exp $ SHA1 (libopensync-0.22.tar.bz2) = 47860a8c6621aa89fbff2af2517787747af7cc30 RMD160 (libopensync-0.22.tar.bz2) = a1e9715d037a7c474b80d609e6c96a24cbb6692f Size (libopensync-0.22.tar.bz2) = 489978 bytes -SHA1 (patch-aa) = 353b17668c17e531343d280575beca707f4f643d +SHA1 (patch-aa) = 4bcf03611850719042bafd794fc413cef159a702 SHA1 (patch-ab) = 057f995d58c98eba96e22671d9c8ee0ec8270b3e SHA1 (patch-ac) = f6a8c12e9344a7f68439b06f8797bfa30106d0e3 SHA1 (patch-ad) = 2020bdc4d4ed38e25c4376aefc4b81ed00a3a786 SHA1 (patch-ae) = 39b5cf27a5b1722f5d8550b97deb1a8763a4ace1 +SHA1 (patch-af) = 07666352a1cd68ae00b10fc5eefeb8001673abe7 diff --git a/comms/libopensync/patches/patch-aa b/comms/libopensync/patches/patch-aa index 72ffcc6137a..560251d3b48 100644 --- a/comms/libopensync/patches/patch-aa +++ b/comms/libopensync/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.2 2007/12/11 06:04:02 yyamano Exp $ +$NetBSD: patch-aa,v 1.3 2011/07/21 15:35:55 joerg Exp $ --- formats/vformats-xml/vformat.c.orig 2007-03-27 20:49:27.000000000 +0900 +++ formats/vformats-xml/vformat.c @@ -26,8 +26,8 @@ $NetBSD: patch-aa,v 1.2 2007/12/11 06:04:02 yyamano Exp $ - if (isalnum(a)) { - if (isalnum(b)) { -+ if (isalnum((int)a)) { -+ if (isalnum((int)b)) { ++ if (isalnum((unsigned char)a)) { ++ if (isalnum((unsigned char)b)) { /* e.g. ...N=C3=BCrnberg\r\n * ^^^ */ @@ -36,7 +36,7 @@ $NetBSD: patch-aa,v 1.2 2007/12/11 06:04:02 yyamano Exp $ */ char *tmplp = lp; - if (*(++tmplp) == '\r' && *(++tmplp) == '\n' && isalnum(*(++tmplp))) { -+ if (*(++tmplp) == '\r' && *(++tmplp) == '\n' && isalnum((int)*(++tmplp))) { ++ if (*(++tmplp) == '\r' && *(++tmplp) == '\n' && isalnum((unsigned char)*(++tmplp))) { x1 = a; x2 = *tmplp; lp = tmplp; @@ -45,7 +45,7 @@ $NetBSD: patch-aa,v 1.2 2007/12/11 06:04:02 yyamano Exp $ d = *(++tmplp); e = *(++tmplp); - if (b == '\r' && c == '\n' && isalnum(d) && isalnum(e)) { -+ if (b == '\r' && c == '\n' && isalnum((int)d) && isalnum((int)e)) { ++ if (b == '\r' && c == '\n' && isalnum((unsigned char)d) && isalnum((unsigned char)e)) { x1 = d; x2 = e; lp = tmplp; @@ -55,8 +55,31 @@ $NetBSD: patch-aa,v 1.2 2007/12/11 06:04:02 yyamano Exp $ - a = tolower (x1); - b = tolower (x2); -+ a = tolower ((int)x1); -+ b = tolower ((int)x2); ++ a = tolower ((unsigned char)x1); ++ b = tolower ((unsigned char)x2); c = (((a>='a'?a-'a'+10:a-'0')&0x0f) << 4) | ((b>='a'?b-'a'+10:b-'0')&0x0f); +@@ -1751,11 +1751,11 @@ static const char *base64_alphabet = "AB + + //static unsigned char _evc_base64_rank[256]; + +-static void base64_init(char *rank) ++static void base64_init(char *rank, size_t len) + { + int i; + +- memset(rank, 0xff, sizeof(rank)); ++ memset(rank, 0xff, len); + for (i=0;i<64;i++) { + rank[(unsigned int)base64_alphabet[i]] = i; + } +@@ -1880,7 +1880,7 @@ static size_t base64_encode_step(unsigne + static size_t base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int *state, unsigned int *save) + { + unsigned char base64_rank[256]; +- base64_init((char*)base64_rank); ++ base64_init((char*)base64_rank, sizeof(base64_rank)); + + register unsigned char *inptr, *outptr; + unsigned char *inend, c; diff --git a/comms/libopensync/patches/patch-af b/comms/libopensync/patches/patch-af new file mode 100644 index 00000000000..677e2e33b19 --- /dev/null +++ b/comms/libopensync/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1 2011/07/21 15:35:55 joerg Exp $ + +--- tools/osyncstress.c.orig 2011-07-21 15:14:35.000000000 +0000 ++++ tools/osyncstress.c +@@ -184,7 +184,7 @@ void change_content(OSyncEngine *engine) + case 2: + if (osync_member_delete_data(meminfo->member, chinfo->change)) { + printf("Deleting data %s for member %lli. Objtype: %s Format: %s\n", osync_change_get_uid(chinfo->change), osync_member_get_id(meminfo->member), osync_objtype_get_name(osync_change_get_objtype(chinfo->change)), osync_objformat_get_name(osync_change_get_objformat(chinfo->change))); +- if (!osync_group_get_slow_sync(engine->group, osync_objtype_get_name(osync_change_get_objtype(chinfo->change)))); ++ if (!osync_group_get_slow_sync(engine->group, osync_objtype_get_name(osync_change_get_objtype(chinfo->change)))) + chinfo->type = CHANGE_DELETED; + } + break; |