pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/comms/synce-rra Fixed the compiler warnings (here with...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9821b801b900
branches:  trunk
changeset: 534000:9821b801b900
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Oct 10 17:12:51 2007 +0000

description:
Fixed the compiler warnings (here with -Werror) the proper way, by doing
the type casts just before calling the <ctype.h> functions.

diffstat:

 comms/synce-rra/distinfo         |   9 ++++-----
 comms/synce-rra/patches/patch-aa |  13 -------------
 comms/synce-rra/patches/patch-ab |  17 -----------------
 comms/synce-rra/patches/patch-ac |  13 -------------
 comms/synce-rra/patches/patch-ae |  13 -------------
 comms/synce-rra/patches/patch-ah |  22 ++++++++++++++++++++++
 comms/synce-rra/patches/patch-ai |  31 +++++++++++++++++++++++++++++++
 comms/synce-rra/patches/patch-aj |  22 ++++++++++++++++++++++
 8 files changed, 79 insertions(+), 61 deletions(-)

diffs (181 lines):

diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/distinfo
--- a/comms/synce-rra/distinfo  Wed Oct 10 16:57:25 2007 +0000
+++ b/comms/synce-rra/distinfo  Wed Oct 10 17:12:51 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2006/03/03 22:06:44 kristerw Exp $
+$NetBSD: distinfo,v 1.6 2007/10/10 17:12:51 rillig Exp $
 
 SHA1 (synce-rra-0.9.1.tar.gz) = 9532427890404a5f095df6b95e140c11e20e2e9c
 RMD160 (synce-rra-0.9.1.tar.gz) = af3b87221f28db88a744039b9c709f2a534d4602
@@ -6,9 +6,8 @@
 SHA1 (rra-fixes-after-V0_9_1.diff) = 14f25880b79ef27a573c227d151021954247d78c
 RMD160 (rra-fixes-after-V0_9_1.diff) = a030ee14e2b59cfcd9630e2520761099bf150515
 Size (rra-fixes-after-V0_9_1.diff) = 11297 bytes
-SHA1 (patch-aa) = 9ee2701ee684022e6cba60988915a36bc2649330
-SHA1 (patch-ab) = da7a149c9a7ef3569845af795b9bf47441bcd19c
-SHA1 (patch-ac) = c32888b506572d8bf858f4b75836cc8c38c1a277
 SHA1 (patch-ad) = 7d5bcf1b6e26355cec79522e5caa64528d7a8d82
-SHA1 (patch-ae) = 49264cf568a81f68f661aba254c1f4e34f65f3c1
 SHA1 (patch-af) = 10c72841de2279a5f78713784d692c6c205cdce0
+SHA1 (patch-ah) = 33debd3a81e7903a0b3d473383d605e5fad773c9
+SHA1 (patch-ai) = f360b298cef4db55281382367ce3a93b9d1e5edc
+SHA1 (patch-aj) = c7379e194118506611de656c91cde2a49746bcd8
diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/patches/patch-aa
--- a/comms/synce-rra/patches/patch-aa  Wed Oct 10 16:57:25 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/10/13 16:57:41 wiz Exp $
-
---- lib/contact.c.orig 2005-05-13 13:35:28.000000000 +0200
-+++ lib/contact.c
-@@ -684,7 +684,7 @@ static uint32_t address_ids[ADDRESS_FIEL
-       {ID_HOME_COUNTRY,     ID_WORK_COUNTRY,       ID_OTHER_COUNTRY}      /* country */
- };
- 
--static char* strdup_quoted_printable(const char* source)/*{{{*/
-+static char* strdup_quoted_printable(const unsigned char* source)/*{{{*/
- {
-       char* result = malloc(strlen(source) + 1);
-       char* dest = result;
diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/patches/patch-ab
--- a/comms/synce-rra/patches/patch-ab  Wed Oct 10 16:57:25 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2005/10/13 16:57:41 wiz Exp $
-
---- lib/parser.c.orig  2005-05-13 13:31:07.000000000 +0200
-+++ lib/parser.c
-@@ -55,10 +55,10 @@ struct _Parser
-       size_t propval_count;
- };
- 
--bool parser_duration_to_seconds(const char* duration, int* result)/*{{{*/
-+bool parser_duration_to_seconds(const unsigned char* duration, int* result)/*{{{*/
- {
-   enum { dur_sign, dur_p, dur_any, dur_time, dur_end } state = dur_sign;
--  const char *p;
-+  const unsigned char *p;
-   struct tm time_struct;
-   int sign = 1;
-   int value = 0;
diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/patches/patch-ac
--- a/comms/synce-rra/patches/patch-ac  Wed Oct 10 16:57:25 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2005/10/13 16:57:41 wiz Exp $
-
---- lib/parser.h.orig  2004-01-04 21:22:08.000000000 +0100
-+++ lib/parser.h
-@@ -27,7 +27,7 @@ void parser_component_add_parser_compone
- void parser_component_add_parser_property (ParserComponent* self, ParserProperty*  pt);
- 
- /* helper functions */
--bool parser_duration_to_seconds  (const char* duration, int* seconds);
-+bool parser_duration_to_seconds  (const unsigned char* duration, int* seconds);
- bool parser_datetime_to_struct   (const char* datetime, struct tm* tm, bool* is_utc);
- bool parser_datetime_to_unix_time(const char* datetime, time_t* unix_time, bool* is_utc);
- 
diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/patches/patch-ae
--- a/comms/synce-rra/patches/patch-ae  Wed Oct 10 16:57:25 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-ae,v 1.1.1.1 2005/10/13 16:57:41 wiz Exp $
-
---- lib/timezone.c.orig        2005-03-05 21:37:51.000000000 +0100
-+++ lib/timezone.c
-@@ -126,7 +126,7 @@ exit:
- void rra_timezone_create_id(RRA_Timezone* tzi, char** id)/*{{{*/
- {
-   char* name = wstr_to_ascii(tzi->StandardName);
--  char* p;
-+  unsigned char* p;
-   char buffer[128];
- 
-   if (!id)
diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/synce-rra/patches/patch-ah  Wed Oct 10 17:12:51 2007 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ah,v 1.1 2007/10/10 17:12:52 rillig Exp $
+
+--- lib/contact.c.orig 2007-10-10 17:04:00.000000000 +0000
++++ lib/contact.c      2007-10-10 17:05:37.000000000 +0000
+@@ -704,7 +704,7 @@ typedef enum _VcardState
+ 
+ #define myisblank(c)    ((c) == ' '  || (c) == '\t')
+ #define myisnewline(c)  ((c) == '\n' || (c) == '\r')
+-
++#define myisxdigit(c)   isdigit((unsigned char)(c))
+ #define STR_EQUAL(a,b)  (0 == strcasecmp(a,b))
+ 
+ #define STR_IN_STR(haystack, needle)  (0 != strcasestr(haystack, needle))
+@@ -755,7 +755,7 @@ static char* strdup_quoted_printable(con
+       {
+               if ('=' == source[0])
+               {
+-                      if (isxdigit(source[1]) && isxdigit(source[2]))
++                      if (myisxdigit(source[1]) && myisxdigit(source[2]))
+                       {
+                               char hex[3] = {source[1], source[2], '\0'};
+                               *dest++ = strtol(hex, NULL, 16);
diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/synce-rra/patches/patch-ai  Wed Oct 10 17:12:51 2007 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-ai,v 1.1 2007/10/10 17:12:53 rillig Exp $
+
+--- lib/parser.c.orig  2005-05-13 11:31:07.000000000 +0000
++++ lib/parser.c       2007-10-10 17:06:48.000000000 +0000
+@@ -55,6 +55,8 @@ struct _Parser
+       size_t propval_count;
+ };
+ 
++#define myisdigit(c)    isdigit((unsigned char)(c))
++
+ bool parser_duration_to_seconds(const char* duration, int* result)/*{{{*/
+ {
+   enum { dur_sign, dur_p, dur_any, dur_time, dur_end } state = dur_sign;
+@@ -122,7 +124,7 @@ bool parser_duration_to_seconds(const ch
+             break;
+ 
+           default:
+-            if (isdigit(*p))
++            if (myisdigit(*p))
+             {
+               value = (value * 10) + (*p - '0');
+             }
+@@ -153,7 +155,7 @@ bool parser_duration_to_seconds(const ch
+             break;
+ 
+           default:
+-            if (isdigit(*p))
++            if (myisdigit(*p))
+             {
+               value = (value * 10) + (*p - '0');
+             }
diff -r 8648f68fbb66 -r 9821b801b900 comms/synce-rra/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/synce-rra/patches/patch-aj  Wed Oct 10 17:12:51 2007 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-aj,v 1.1 2007/10/10 17:12:53 rillig Exp $
+
+--- lib/timezone.c.orig        2005-03-05 20:37:51.000000000 +0000
++++ lib/timezone.c     2007-10-10 17:08:30.000000000 +0000
+@@ -18,6 +18,8 @@
+ #define LETOH16(x)  x = letoh16(x)
+ #define LETOH32(x)  x = letoh32(x)
+ 
++#define myisalnum(c)    isalnum((unsigned char)(c))
++
+ static const uint8_t empty[6] = {0,0,0,0,0,0};
+ 
+ /*
+@@ -134,7 +136,7 @@ void rra_timezone_create_id(RRA_Timezone
+ 
+   for (p = name; *p != '\0'; p++)
+   {
+-    if (!isalnum(*p))
++    if (!myisalnum(*p))
+       *p = '_';
+   }
+ 



Home | Main Index | Thread Index | Old Index