[119625] trunk/dports/graphics/icoutils
mk at macports.org
mk at macports.org
Fri May 2 11:26:12 PDT 2014
Revision: 119625
https://trac.macports.org/changeset/119625
Author: mk at macports.org
Date: 2014-05-02 11:26:12 -0700 (Fri, 02 May 2014)
Log Message:
-----------
icoutil: patches to avoid some clang warnings
Modified Paths:
--------------
trunk/dports/graphics/icoutils/Portfile
Added Paths:
-----------
trunk/dports/graphics/icoutils/files/
trunk/dports/graphics/icoutils/files/patch-common-llist.c.diff
trunk/dports/graphics/icoutils/files/patch-lib-error.c.diff
Modified: trunk/dports/graphics/icoutils/Portfile
===================================================================
--- trunk/dports/graphics/icoutils/Portfile 2014-05-02 17:51:54 UTC (rev 119624)
+++ trunk/dports/graphics/icoutils/Portfile 2014-05-02 18:26:12 UTC (rev 119625)
@@ -5,7 +5,7 @@
name icoutils
version 0.31.0
-revision 3
+revision 4
categories graphics
platforms darwin
license GPL-3
@@ -25,6 +25,9 @@
use_bzip2 yes
+patchfiles patch-common-llist.c.diff \
+ patch-lib-error.c.diff
+
depends_lib port:libpng
depends_run port:perl5.16 \
port:p5.16-libwww-perl
Added: trunk/dports/graphics/icoutils/files/patch-common-llist.c.diff
===================================================================
--- trunk/dports/graphics/icoutils/files/patch-common-llist.c.diff (rev 0)
+++ trunk/dports/graphics/icoutils/files/patch-common-llist.c.diff 2014-05-02 18:26:12 UTC (rev 119625)
@@ -0,0 +1,38 @@
+--- common/llist.c.orig 2012-05-03 19:14:50.000000000 -0400
++++ common/llist.c 2014-05-02 13:15:38.000000000 -0400
+@@ -281,7 +281,7 @@
+ {
+ LNode *entry;
+
+- if (index < 0 || index >= list->size)
++ if (index >= list->size)
+ return NULL;
+
+ entry = llist_get_entry(list, index);
+@@ -294,7 +294,7 @@
+ LNode *entry;
+ void *old_data;
+
+- if (index < 0 || index >= list->size)
++ if (index >= list->size)
+ return NULL;
+
+ entry = llist_get_entry(list, index);
+@@ -316,7 +316,7 @@
+ {
+ LNode *entry;
+
+- if (index < 0 || index > list->size)
++ if (index > list->size)
+ return;
+
+ entry = xmalloc(sizeof(LNode));
+@@ -343,7 +343,7 @@
+ LNode *entry;
+ void *data;
+
+- if (index < 0 || index >= list->size)
++ if (index >= list->size)
+ return NULL;
+
+ entry = llist_get_entry(list, index);
Added: trunk/dports/graphics/icoutils/files/patch-lib-error.c.diff
===================================================================
--- trunk/dports/graphics/icoutils/files/patch-lib-error.c.diff (rev 0)
+++ trunk/dports/graphics/icoutils/files/patch-lib-error.c.diff 2014-05-02 18:26:12 UTC (rev 119625)
@@ -0,0 +1,15 @@
+--- lib/error.c.orig 2014-05-02 13:26:30.000000000 -0400
++++ lib/error.c 2014-05-02 13:27:28.000000000 -0400
+@@ -377,8 +377,10 @@
+ __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+ file_name, line_number);
+ #else
+- fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+- file_name, line_number);
++ if (file_name != NULL)
++ fprintf (stderr, "%s:%d: ", file_name, line_number);
++ else
++ fprintf (stderr, " ");
+ #endif
+
+ va_start (args, message);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140502/c9a74779/attachment.html>
More information about the macports-changes
mailing list