Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Apr 2012 16:08:41 GMT
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        clsung@FreeBSD.org
Subject:   ports/167231: [PATCH] www/clearsilver: Fix build with clang
Message-ID:  <201204231608.q3NG8fnO030729@freefall.freebsd.org>
Resent-Message-ID: <201204231610.q3NGAAWr030789@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167231
>Category:       ports
>Synopsis:       [PATCH] www/clearsilver: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 23 16:10:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Baptiste Daroussin
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD azathoth.lan 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r233418M: Sat Mar 24 13:45:31 CET
>Description:
Fix build with clang

Added file(s):
- files/patch-cgi__cgi.c
- files/patch-cgi__html.c
- files/patch-cgi__rfc2388.c
- files/patch-cs__csparse.c
- files/patch-cs__cstest.c
- files/patch-util__dict.c
- files/patch-util__neo_files.c
- files/patch-util__neo_hash.c
- files/patch-util__neo_hdf.c
- files/patch-util__neo_net.c
- files/patch-util__neo_server.c
- files/patch-util__neo_str.c
- files/patch-util__skiplist.c
- files/patch-util__ulist.c
- files/patch-util__ulocks.c

Port maintainer (clsung@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_5 (mode: change, diff: CVS)
>How-To-Repeat:
>Fix:

--- clearsilver-0.10.5.patch begins here ---
Index: files/patch-cgi__cgi.c
===================================================================
RCS file: files/patch-cgi__cgi.c
diff -N files/patch-cgi__cgi.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-cgi__cgi.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,34 @@
+--- ./cgi/cgi.c.orig	2007-07-12 04:38:03.000000000 +0200
++++ ./cgi/cgi.c	2012-04-23 18:02:21.533510630 +0200
+@@ -585,11 +585,11 @@
+   struct _cgi_parse_cb *my_pcb;
+ 
+   if (method == NULL || ctype == NULL)
+-    return nerr_raise(NERR_ASSERT, "method and type must not be NULL to register cb");
++    return nerr_raise(NERR_ASSERT, "%s", "method and type must not be NULL to register cb");
+ 
+   my_pcb = (struct _cgi_parse_cb *) calloc(1, sizeof(struct _cgi_parse_cb));
+   if (my_pcb == NULL)
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory to register parse cb");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory to register parse cb");
+ 
+   my_pcb->method = strdup(method);
+   my_pcb->ctype = strdup(ctype);
+@@ -600,7 +600,7 @@
+     if (my_pcb->ctype != NULL)
+       free(my_pcb->ctype);
+     free(my_pcb);
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory to register parse cb");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory to register parse cb");
+   }
+   if (!strcmp(my_pcb->method, "*"))
+     my_pcb->any_method = 1;
+@@ -753,7 +753,7 @@
+   *cgi = NULL;
+   mycgi = (CGI *) calloc (1, sizeof(CGI));
+   if (mycgi == NULL)
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate space for CGI");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate space for CGI");
+ 
+   mycgi->time_start = ne_timef();
+ 
Index: files/patch-cgi__html.c
===================================================================
RCS file: files/patch-cgi__html.c
diff -N files/patch-cgi__html.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-cgi__html.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,29 @@
+--- ./cgi/html.c.orig	2006-10-20 01:26:35.000000000 +0200
++++ ./cgi/html.c	2012-04-23 18:02:55.987510632 +0200
+@@ -388,7 +388,7 @@
+ 	    url = (char *) malloc(url_len+1);
+ 	    if (url == NULL)
+ 	    {
+-	      err = nerr_raise(NERR_NOMEM,
++	      err = nerr_raise(NERR_NOMEM, "%s",
+ 		  "Unable to allocate memory to convert url");
+ 	      break;
+ 	    }
+@@ -401,7 +401,7 @@
+ 	    url = (char *) malloc(url_len+1);
+ 	    if (url == NULL)
+ 	    {
+-	      err = nerr_raise(NERR_NOMEM,
++	      err = nerr_raise(NERR_NOMEM, "%s",
+ 		  "Unable to allocate memory to convert url");
+ 	      break;
+ 	    }
+@@ -419,7 +419,7 @@
+ 	  free(esc_url);
+ 	  if (new_url == NULL)
+ 	  {
+-	    err = nerr_raise(NERR_NOMEM, "Unable to allocate memory to convert url");
++	    err = nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory to convert url");
+ 	    break;
+ 	  }
+ 	  err = string_append (out, new_url);
Index: files/patch-cgi__rfc2388.c
===================================================================
RCS file: files/patch-cgi__rfc2388.c
diff -N files/patch-cgi__rfc2388.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-cgi__rfc2388.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,91 @@
+--- ./cgi/rfc2388.c.orig	2006-08-29 10:44:50.000000000 +0200
++++ ./cgi/rfc2388.c	2012-04-23 18:04:40.890511212 +0200
+@@ -44,7 +44,7 @@
+   l = q - p;
+   *val = (char *) malloc (l+1);
+   if (*val == NULL)
+-    return nerr_raise (NERR_NOMEM, "Unable to allocate space for val");
++    return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate space for val");
+   memcpy (*val, p, l);
+   (*val)[l] = '\0';
+ 
+@@ -86,7 +86,7 @@
+       {
+ 	*val = strdup ("");
+ 	if (*val == NULL) 
+-	  return nerr_raise (NERR_NOMEM, "Unable to allocate value");
++	  return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate value");
+ 	return STATUS_OK;
+       }
+     }
+@@ -110,7 +110,7 @@
+       {
+ 	r = (char *) malloc (al+1);
+ 	if (r == NULL) 
+-	  return nerr_raise (NERR_NOMEM, "Unable to allocate value");
++	  return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate value");
+ 	memcpy (r, v, al);
+ 	r[al] = '\0';
+ 	*val = r;
+@@ -133,7 +133,7 @@
+     cgi->buflen = 4096;
+     cgi->buf = (char *) malloc (sizeof(char) * cgi->buflen);
+     if (cgi->buf == NULL)
+-      return nerr_raise (NERR_NOMEM, "Unable to allocate cgi buf");
++      return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate cgi buf");
+   }
+   if (cgi->unget)
+   {
+@@ -171,7 +171,7 @@
+   cgiwrap_read (cgi->buf + ofs, to_read, &(cgi->readlen));
+   if (cgi->readlen < 0)
+   {
+-    return nerr_raise_errno (NERR_IO, "POST Read Error");
++    return nerr_raise_errno (NERR_IO, "%s", "POST Read Error");
+   }
+   if (cgi->readlen == 0)
+   {
+@@ -182,7 +182,7 @@
+   if (cgi->upload_cb)
+   {
+     if (cgi->upload_cb (cgi, cgi->data_read, cgi->data_expected))
+-      return nerr_raise (CGIUploadCancelled, "Upload Cancelled");
++      return nerr_raise (CGIUploadCancelled, "%s", "Upload Cancelled");
+   }
+   cgi->readlen += ofs;
+   p = memchr (cgi->buf, '\n', cgi->readlen);
+@@ -235,7 +235,7 @@
+     if (line->len > 50*1024*1024)
+     {
+       string_clear(line);
+-      return nerr_raise(NERR_ASSERT, "read_header_line exceeded 50MB");
++      return nerr_raise(NERR_ASSERT, "%s", "read_header_line exceeded 50MB");
+     }
+   }
+   return nerr_pass (err);
+@@ -399,7 +399,7 @@
+ 	    strcmp(tmp, "binary"))
+ 	{
+ 	  free(tmp);
+-	  err = nerr_raise (NERR_ASSERT, "form-data encoding is not supported");
++	  err = nerr_raise (NERR_ASSERT, "%s", "form-data encoding is not supported");
+ 	  break;
+ 	}
+ 	free(tmp);
+@@ -559,14 +559,14 @@
+   l = hdf_get_int_value (cgi->hdf, "CGI.ContentLength", -1);
+   ct_hdr = hdf_get_value (cgi->hdf, "CGI.ContentType", NULL);
+   if (ct_hdr == NULL) 
+-    return nerr_raise (NERR_ASSERT, "No content type header?");
++    return nerr_raise (NERR_ASSERT, "%s", "No content type header?");
+ 
+   cgi->data_expected = l;
+   cgi->data_read = 0;
+   if (cgi->upload_cb)
+   {
+     if (cgi->upload_cb (cgi, cgi->data_read, cgi->data_expected))
+-      return nerr_raise (CGIUploadCancelled, "Upload Cancelled");
++      return nerr_raise (CGIUploadCancelled, "%s", "Upload Cancelled");
+   }
+ 
+   err = _header_attr (ct_hdr, "boundary", &boundary);
Index: files/patch-cs__csparse.c
===================================================================
RCS file: files/patch-cs__csparse.c
diff -N files/patch-cs__csparse.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-cs__csparse.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,149 @@
+--- ./cs/csparse.c.orig	2012-04-23 17:45:37.010509629 +0200
++++ ./cs/csparse.c	2012-04-23 17:49:26.478510015 +0200
+@@ -262,7 +262,7 @@
+   *node = NULL;
+   my_node = (CSTREE *) calloc (1, sizeof (CSTREE));
+   if (my_node == NULL)
+-    return nerr_raise (NERR_NOMEM, "Unable to allocate memory for node");
++    return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate memory for node");
+ 
+   my_node->cmd = 0;
+   my_node->node_num = NodeNumber++;
+@@ -375,7 +375,7 @@
+   node = (CS_ERROR *) calloc(1, sizeof(CS_ERROR));
+   if (node == NULL) 
+   {
+-    return nerr_raise (NERR_NOMEM,
++    return nerr_raise (NERR_NOMEM, "%s",
+         "Unable to allocate memory for error entry");
+   }
+ 
+@@ -406,7 +406,7 @@
+   CS_POSITION pos;
+ 
+   if (path == NULL)
+-    return nerr_raise (NERR_ASSERT, "path is NULL");
++    return nerr_raise (NERR_ASSERT, "%s", "path is NULL");
+ 
+   if (parse->fileload)
+   {
+@@ -791,7 +791,7 @@
+             NEOERR *err;
+             char *mapped_name = sprintf_alloc("%s%s", map->s, c);
+             if (mapped_name == NULL)
+-              return nerr_raise(NERR_NOMEM, "Unable to allocate memory to create mapped name");
++              return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory to create mapped name");
+             err = hdf_set_value(parse->hdf, mapped_name, value);
+             free(mapped_name);
+             return nerr_pass(err);
+@@ -814,7 +814,7 @@
+ 	  map->s = strdup(value);
+ 	  if (tmp != NULL) free(tmp);
+ 	  if (map->s == NULL && value != NULL)
+-	    return nerr_raise(NERR_NOMEM,
++	    return nerr_raise(NERR_NOMEM, "%s",
+ 		"Unable to allocate memory to set var");
+ 
+ 	  return STATUS_OK;
+@@ -2120,9 +2120,9 @@
+   NEOERR *err;
+ 
+   if (expr == NULL)
+-    return nerr_raise (NERR_ASSERT, "expr is NULL");
++    return nerr_raise (NERR_ASSERT, "%s", "expr is NULL");
+   if (result == NULL)
+-    return nerr_raise (NERR_ASSERT, "result is NULL");
++    return nerr_raise (NERR_ASSERT, "%s", "result is NULL");
+ 
+ #if DEBUG_EXPR_EVAL
+   _depth++;
+@@ -2200,7 +2200,7 @@
+           result->n = arg_eval_num (parse, &arg1);
+           break;
+         case CS_OP_LPAREN:
+-          return nerr_raise(NERR_ASSERT, "LPAREN should be handled above");
++          return nerr_raise(NERR_ASSERT, "%s", "LPAREN should be handled above");
+         default:
+           result->n = 0;
+           ne_warn ("Unsupported op %s in eval_expr", expand_token_type(expr->op_type, 1));
+@@ -2421,7 +2421,7 @@
+ 	s = strdup(s);
+ 	if (s == NULL)
+ 	{
+-	  return nerr_raise(NERR_NOMEM, "Unable to allocate memory for lvar_eval");
++	  return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for lvar_eval");
+ 	}
+       }
+ 
+@@ -3442,7 +3442,7 @@
+   memset(&each_map, 0, sizeof(each_map));
+ 
+   carg = node->vargs;
+-  if (carg == NULL) return nerr_raise (NERR_ASSERT, "No arguments in loop eval?");
++  if (carg == NULL) return nerr_raise (NERR_ASSERT, "%s", "No arguments in loop eval?");
+   err = eval_expr(parse, carg, &val);
+   if (err) return nerr_pass(err);
+   end = arg_eval_num(parse, &val);
+@@ -3532,7 +3532,7 @@
+   CSTREE *node;
+ 
+   if (parse->tree == NULL)
+-    return nerr_raise (NERR_ASSERT, "No parse tree exists");
++    return nerr_raise (NERR_ASSERT, "%s", "No parse tree exists");
+ 
+   parse->output_ctx = ctx;
+   parse->output_cb = cb;
+@@ -3605,7 +3605,7 @@
+ 	s = va_arg(ap, char **);
+ 	if (s == NULL)
+ 	{
+-	  err = nerr_raise(NERR_ASSERT,
++	  err = nerr_raise(NERR_ASSERT, "%s",
+ 	      "Invalid number of arguments in call to cs_arg_parse");
+ 	  break;
+ 	}
+@@ -3615,7 +3615,7 @@
+ 	i = va_arg(ap, long int *);
+ 	if (i == NULL)
+ 	{
+-	  err = nerr_raise(NERR_ASSERT,
++	  err = nerr_raise(NERR_ASSERT, "%s",
+ 	      "Invalid number of arguments in call to cs_arg_parse");
+ 	  break;
+ 	}
+@@ -3938,7 +3938,7 @@
+   }
+   slice = (char *) malloc (sizeof(char) * (e-b+1));
+   if (slice == NULL)
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for string slice");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for string slice");
+   strncpy(slice, s + b, e-b);
+   free(s);
+   slice[e-b] = '\0';
+@@ -4052,7 +4052,7 @@
+ 
+   my_parse = (CSPARSE *) calloc (1, sizeof (CSPARSE));
+   if (my_parse == NULL)
+-    return nerr_raise (NERR_NOMEM, "Unable to allocate memory for CSPARSE");
++    return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate memory for CSPARSE");
+ 
+   err = uListInit (&(my_parse->stack), 10, 0);
+   if (err != STATUS_OK)
+@@ -4079,7 +4079,7 @@
+   if (entry == NULL)
+   {
+     cs_destroy (&my_parse);
+-    return nerr_raise (NERR_NOMEM,
++    return nerr_raise (NERR_NOMEM, "%s",
+ 	"Unable to allocate memory for stack entry");
+   }
+   entry->state = ST_GLOBAL;
+@@ -4325,7 +4325,7 @@
+   char buf[4096];
+ 
+   if (parse->tree == NULL)
+-    return nerr_raise (NERR_ASSERT, "No parse tree exists");
++    return nerr_raise (NERR_ASSERT, "%s", "No parse tree exists");
+ 
+   node = parse->tree;
+   return nerr_pass (dump_node (parse, node, 0, ctx, cb, buf, sizeof(buf)));
Index: files/patch-cs__cstest.c
===================================================================
RCS file: files/patch-cs__cstest.c
diff -N files/patch-cs__cstest.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-cs__cstest.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,11 @@
+--- ./cs/cstest.c.orig	2006-03-13 00:54:15.000000000 +0100
++++ ./cs/cstest.c	2012-04-23 17:54:05.809909855 +0200
+@@ -30,7 +30,7 @@
+   int x = 0;
+ 
+   if (s == NULL)
+-    return nerr_raise(NERR_NOMEM, "Unable to duplicate string in test_strfunc");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to duplicate string in test_strfunc");
+ 
+   while (s[x]) {
+     s[x] = tolower(s[x]);
Index: files/patch-util__dict.c
===================================================================
RCS file: files/patch-util__dict.c
diff -N files/patch-util__dict.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__dict.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,47 @@
+--- ./util/dict.c.orig	2005-07-01 02:48:26.000000000 +0200
++++ ./util/dict.c	2012-04-23 17:58:36.491954556 +0200
+@@ -92,14 +92,14 @@
+ 
+   /* check if we can set a new value */
+   if(! (newval->value || newval->new))
+-    return nerr_raise(NERR_ASSERT, "value or new are NULL");
++    return nerr_raise(NERR_ASSERT, "%s", "value or new are NULL");
+ 
+   if(! (my_item = calloc(1, sizeof(struct dictItem))))
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate new dictItem");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate new dictItem");
+ 
+   if(! (my_item->id = strdup(id))) {
+     free(my_item);
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate new id for dictItem");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate new id for dictItem");
+   }
+ 
+   /* set new value */
+@@ -171,7 +171,7 @@
+ 
+   /* check for entry (maybe not found...) */
+   if(! entry)
+-    return nerr_raise(NERR_NOT_FOUND, "Entry is NULL");
++    return nerr_raise(NERR_NOT_FOUND, "%s", "Entry is NULL");
+ 
+   /* only use entry if not deleted */
+   if(! entry->deleted) {
+@@ -226,7 +226,7 @@
+   /* create new item and insert entry */
+   entry = calloc(1, sizeof(struct dictEntry));
+   if (entry == NULL)
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for dictEntry");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for dictEntry");
+     
+   /* create/insert item (or cleanup) */
+   err = dictNewItem(dict, entry, id, newval, NULL);
+@@ -559,7 +559,7 @@
+   do {
+ 
+     if(! (dict = calloc(1, sizeof(struct _dictCtx))))
+-      return nerr_raise (NERR_NOMEM, "Unable to allocate memory for dictCtx");
++      return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate memory for dictCtx");
+ 
+     dict->useCase = useCase;
+     dict->hash = python_string_hash;
Index: files/patch-util__neo_files.c
===================================================================
RCS file: files/patch-util__neo_files.c
diff -N files/patch-util__neo_files.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__neo_files.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,11 @@
+--- ./util/neo_files.c.orig	2007-07-12 04:14:23.000000000 +0200
++++ ./util/neo_files.c	2012-04-23 17:50:13.873212371 +0200
+@@ -216,7 +216,7 @@
+   NEOERR *err = STATUS_OK;
+ 
+   if (files == NULL) 
+-    return nerr_raise(NERR_ASSERT, "Invalid call to ne_listdir_fmatch");
++    return nerr_raise(NERR_ASSERT, "%s", "Invalid call to ne_listdir_fmatch");
+ 
+   if (*files == NULL)
+   {
Index: files/patch-util__neo_hash.c
===================================================================
RCS file: files/patch-util__neo_hash.c
diff -N files/patch-util__neo_hash.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__neo_hash.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,38 @@
+--- ./util/neo_hash.c.orig	2006-10-19 01:57:24.000000000 +0200
++++ ./util/neo_hash.c	2012-04-23 17:56:07.096509854 +0200
+@@ -27,7 +27,7 @@
+ 
+   my_hash = (NE_HASH *) calloc(1, sizeof(NE_HASH));
+   if (my_hash == NULL)
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for NE_HASH");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for NE_HASH");
+ 
+   my_hash->size = 256;
+   my_hash->num = 0;
+@@ -38,7 +38,7 @@
+   if (my_hash->nodes == NULL)
+   {
+     free(my_hash);
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for NE_HASHNODES");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for NE_HASHNODES");
+   }
+ 
+   *hash = my_hash;
+@@ -88,7 +88,7 @@
+   {
+     *node = (NE_HASHNODE *) malloc(sizeof(NE_HASHNODE));
+     if (node == NULL)
+-      return nerr_raise(NERR_NOMEM, "Unable to allocate NE_HASHNODE");
++      return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate NE_HASHNODE");
+ 
+     (*node)->hashv = hashv;
+     (*node)->key = key;
+@@ -226,7 +226,7 @@
+   /* We always double in size */
+   new_nodes = (NE_HASHNODE **) realloc (hash->nodes, (hash->size*2) * sizeof(NE_HASHNODE));
+   if (new_nodes == NULL)
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory to resize NE_HASH");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory to resize NE_HASH");
+ 
+   hash->nodes = new_nodes;
+   orig_size = hash->size;
Index: files/patch-util__neo_hdf.c
===================================================================
RCS file: files/patch-util__neo_hdf.c
diff -N files/patch-util__neo_hdf.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__neo_hdf.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,83 @@
+--- ./util/neo_hdf.c.orig	2007-07-12 03:52:37.000000000 +0200
++++ ./util/neo_hdf.c	2012-04-23 17:53:28.104660092 +0200
+@@ -59,7 +59,7 @@
+   *hdf = calloc (1, sizeof (HDF));
+   if (*hdf == NULL)
+   {
+-    return nerr_raise (NERR_NOMEM, "Unable to allocate memory for hdf element");
++    return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate memory for hdf element");
+   }
+ 
+   (*hdf)->top = top;
+@@ -406,7 +406,7 @@
+ 
+   _walk_hdf(hdf, name, &obj);
+   if (obj == NULL) 
+-    return nerr_raise(NERR_ASSERT, "Unable to set attribute on none existant node");
++    return nerr_raise(NERR_ASSERT, "%s", "Unable to set attribute on none existant node");
+ 
+   if (obj->attr != NULL)
+   {
+@@ -645,7 +645,7 @@
+     char *new_name = (char *) malloc(strlen(hdf->value) + 1 + strlen(name) + 1);
+     if (new_name == NULL)
+     {
+-      return nerr_raise(NERR_NOMEM, "Unable to allocate memory");
++      return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory");
+     }
+     strcpy(new_name, hdf->value);
+     strcat(new_name, ".");
+@@ -792,7 +792,7 @@
+       char *new_name = (char *) malloc(strlen(hp->value) + strlen(s) + 1);
+       if (new_name == NULL)
+       {
+-        return nerr_raise(NERR_NOMEM, "Unable to allocate memory");
++        return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory");
+       }
+       strcpy(new_name, hp->value);
+       strcat(new_name, s);
+@@ -866,7 +866,7 @@
+   k = vsprintf_alloc(fmt, ap);
+   if (k == NULL)
+   {
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for format string");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for format string");
+   }
+   v = strchr(k, '=');
+   if (v == NULL)
+@@ -1025,7 +1025,7 @@
+     if (copy == NULL)
+     {
+       _dealloc_hdf_attr(dest);
+-      return nerr_raise(NERR_NOMEM, "Unable to allocate copy of HDF_ATTR");
++      return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate copy of HDF_ATTR");
+     }
+     copy->key = strdup(src->key);
+     copy->value = strdup(src->value);
+@@ -1033,7 +1033,7 @@
+     if ((copy->key == NULL) || (copy->value == NULL))
+     {
+       _dealloc_hdf_attr(dest);
+-      return nerr_raise(NERR_NOMEM, "Unable to allocate copy of HDF_ATTR");
++      return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate copy of HDF_ATTR");
+     }
+     if (last) {
+       last->next = copy;
+@@ -1339,7 +1339,7 @@
+   if (str.buf == NULL)
+   {
+     *s = strdup("");
+-    if (*s == NULL) return nerr_raise(NERR_NOMEM, "Unable to allocate empty string");
++    if (*s == NULL) return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate empty string");
+   }
+   else
+   {
+@@ -1831,7 +1831,7 @@
+   string_init(&line);
+ 
+   if (path == NULL) 
+-    return nerr_raise(NERR_ASSERT, "Can't read NULL file");
++    return nerr_raise(NERR_ASSERT, "%s", "Can't read NULL file");
+ 
+   if (top->fileload)
+   {
Index: files/patch-util__neo_net.c
===================================================================
RCS file: files/patch-util__neo_net.c
diff -N files/patch-util__neo_net.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__neo_net.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,160 @@
+--- ./util/neo_net.c.orig	2005-12-06 05:17:08.000000000 +0100
++++ ./util/neo_net.c	2012-04-23 18:00:58.297894435 +0200
+@@ -45,27 +45,27 @@
+   struct sockaddr_in serv_addr;
+ 
+   if ((sfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
+-    return nerr_raise_errno(NERR_IO, "Unable to create socket");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to create socket");
+ 
+   if (setsockopt (sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
+ 	sizeof(on)) == -1)
+   {
+     close(sfd);
+-    return nerr_raise_errno(NERR_IO, "Unable to setsockopt(SO_REUSEADDR)");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to setsockopt(SO_REUSEADDR)");
+   }
+    
+   if(setsockopt (sfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on,
+ 	sizeof(on)) == -1) 
+   {
+     close(sfd);
+-    return nerr_raise_errno(NERR_IO, "Unable to setsockopt(SO_KEEPALIVE)");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to setsockopt(SO_KEEPALIVE)");
+   }
+    
+   if(setsockopt (sfd, IPPROTO_TCP, TCP_NODELAY, (void *)&on, 
+ 	sizeof(on)) == -1)
+   {
+     close(sfd);
+-    return nerr_raise_errno(NERR_IO, "Unable to setsockopt(TCP_NODELAY)");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to setsockopt(TCP_NODELAY)");
+   }
+   serv_addr.sin_family = AF_INET;
+   serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+@@ -121,7 +121,7 @@
+     if (fd >= 0) break;
+     if (ShutdownAccept || errno != EINTR)
+     {
+-      return nerr_raise_errno(NERR_IO, "accept() returned error");
++      return nerr_raise_errno(NERR_IO, "%s", "accept() returned error");
+     }
+     if (errno == EINTR)
+     {
+@@ -133,7 +133,7 @@
+   if (my_sock == NULL)
+   {
+     close(fd);
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for NSOCK");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for NSOCK");
+   }
+   my_sock->fd = fd;
+   my_sock->remote_ip = ntohl(client_addr.sin_addr.s_addr);
+@@ -176,19 +176,19 @@
+   serv_addr.sin_port = htons(port);
+   fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+   if (fd == -1)
+-    return nerr_raise_errno(NERR_IO, "Unable to create socket");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to create socket");
+ 
+   flags = fcntl(fd, F_GETFL, 0 );
+   if (flags == -1)
+   {
+     close(fd);
+-    return nerr_raise_errno(NERR_IO, "Unable to get socket flags");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to get socket flags");
+   }
+ 
+   if (fcntl(fd, F_SETFL, flags | O_NDELAY) == -1)
+   {
+     close(fd);
+-    return nerr_raise_errno(NERR_IO, "Unable to set O_NDELAY");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to set O_NDELAY");
+   }
+ 
+   x = 0;
+@@ -233,7 +233,7 @@
+     if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &optval, &optlen) == -1) 
+     {
+       close(fd);
+-      return nerr_raise_errno(NERR_IO, 
++      return nerr_raise_errno(NERR_IO, "%s", 
+ 	  "Unable to getsockopt to determine connection error");
+     }
+ 
+@@ -253,20 +253,20 @@
+   if (flags == -1)
+   {
+     close(fd);
+-    return nerr_raise_errno(NERR_IO, "Unable to get socket flags");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to get socket flags");
+   }
+ 
+   if (fcntl(fd, F_SETFL, flags & ~O_NDELAY) == -1)
+   {
+     close(fd);
+-    return nerr_raise_errno(NERR_IO, "Unable to set O_NDELAY");
++    return nerr_raise_errno(NERR_IO, "%s", "Unable to set O_NDELAY");
+   }
+ 
+   my_sock = (NSOCK *) calloc(1, sizeof(NSOCK));
+   if (my_sock == NULL)
+   {
+     close(fd);
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for NSOCK");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for NSOCK");
+   }
+   my_sock->fd = fd;
+   my_sock->remote_ip = ntohl(serv_addr.sin_addr.s_addr);
+@@ -344,18 +344,18 @@
+   r = select(sock->fd+1, &fds, NULL, NULL, &tv);
+   if (r == 0)
+   {
+-    return nerr_raise(NERR_IO, "read failed: Timeout");
++    return nerr_raise(NERR_IO, "%s", "read failed: Timeout");
+   }
+   if (r < 0)
+   {
+-    return nerr_raise_errno(NERR_IO, "select for read failed");
++    return nerr_raise_errno(NERR_IO, "%s", "select for read failed");
+   }
+ 
+   sock->ibuf[0] = '\0';
+   r = read(sock->fd, sock->ibuf, NET_BUFSIZE);
+   if (r < 0)
+   {
+-    return nerr_raise_errno(NERR_IO, "read failed");
++    return nerr_raise_errno(NERR_IO, "%s", "read failed");
+   }
+ 
+   sock->ib = 0;
+@@ -390,17 +390,17 @@
+     r = select(sock->fd+1, NULL, &fds, NULL, &tv);
+     if (r == 0)
+     {
+-      return nerr_raise(NERR_IO, "write failed: Timeout");
++      return nerr_raise(NERR_IO, "%s", "write failed: Timeout");
+     }
+     if (r < 0)
+     {
+-      return nerr_raise_errno(NERR_IO, "select for write failed");
++      return nerr_raise_errno(NERR_IO, "%s", "select for write failed");
+     }
+ 
+     r = write(sock->fd, sock->obuf + x, sock->ol - x);
+     if (r < 0)
+     {
+-      return nerr_raise_errno(NERR_IO, "select for write failed");
++      return nerr_raise_errno(NERR_IO, "%s", "select for write failed");
+     }
+     x += r;
+   }
+@@ -559,7 +559,7 @@
+   if (buf[0] != ',')
+   {
+     free(data);
+-    return nerr_raise(NERR_PARSE, "Format error on stream, expected ','");
++    return nerr_raise(NERR_PARSE, "%s", "Format error on stream, expected ','");
+   }
+ 
+   *b = data;
Index: files/patch-util__neo_server.c
===================================================================
RCS file: files/patch-util__neo_server.c
diff -N files/patch-util__neo_server.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__neo_server.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,29 @@
+--- ./util/neo_server.c.orig	2005-06-30 20:52:00.000000000 +0200
++++ ./util/neo_server.c	2012-04-23 18:01:33.745912541 +0200
+@@ -126,7 +126,7 @@
+   NEOERR *err;
+ 
+   if (server->req_cb == NULL)
+-    return nerr_raise(NERR_ASSERT, "nserver requires a request callback");
++    return nerr_raise(NERR_ASSERT, "%s", "nserver requires a request callback");
+ 
+   ignore_pipe();
+ 
+@@ -162,7 +162,7 @@
+ 	child = fork();
+ 	if (child == -1)
+ 	{
+-	  err = nerr_raise_errno(NERR_SYSTEM, "Unable to fork child");
++	  err = nerr_raise_errno(NERR_SYSTEM, "%s", "Unable to fork child");
+ 	  break;
+ 	}
+ 	if (!child)
+@@ -202,7 +202,7 @@
+ 	child = fork();
+ 	if (child == -1)
+ 	{
+-	  err = nerr_raise_errno(NERR_SYSTEM, "Unable to fork child");
++	  err = nerr_raise_errno(NERR_SYSTEM, "%s", "Unable to fork child");
+ 	  break;
+ 	}
+ 	if (!child)
Index: files/patch-util__neo_str.c
===================================================================
RCS file: files/patch-util__neo_str.c
diff -N files/patch-util__neo_str.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__neo_str.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,20 @@
+--- ./util/neo_str.c.orig	2007-07-12 03:24:00.000000000 +0200
++++ ./util/neo_str.c	2012-04-23 17:54:46.120510185 +0200
+@@ -164,7 +164,7 @@
+     va_copy(tmp, ap);
+     a_buf = vnsprintf_alloc(size*2, fmt, tmp);
+     if (a_buf == NULL)
+-      return nerr_raise(NERR_NOMEM, 
++      return nerr_raise(NERR_NOMEM, "%s",
+ 	  "Unable to allocate memory for formatted string");
+     err = string_append(str, a_buf);
+     free(a_buf);
+@@ -220,7 +220,7 @@
+   int x = 0;
+ 
+   if (sep[0] == '\0') 
+-    return nerr_raise (NERR_ASSERT, "separator must be at least one character");
++    return nerr_raise (NERR_ASSERT, "%s", "separator must be at least one character");
+ 
+   err = uListInit (list, 10, 0);
+   if (err) return nerr_pass(err);
Index: files/patch-util__skiplist.c
===================================================================
RCS file: files/patch-util__skiplist.c
diff -N files/patch-util__skiplist.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__skiplist.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,36 @@
+--- ./util/skiplist.c.orig	2005-06-30 20:52:10.000000000 +0200
++++ ./util/skiplist.c	2012-04-23 17:57:31.184893991 +0200
+@@ -152,7 +152,7 @@
+ {
+ 
+   if(! (*item = malloc(SIZEOFITEM(level))))
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate space for skipItem");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate space for skipItem");
+ 
+   /* init new item */
+   (*item)->locks = 0;
+@@ -364,10 +364,10 @@
+ 
+   *skip = NULL;
+   if(! (list = calloc(1, sizeof(struct skipList_struct))))
+-    return nerr_raise(NERR_NOMEM, "Unable to allocate memore for skiplist");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memore for skiplist");
+ 
+   if (maxLevel == 0)
+-    return nerr_raise(NERR_ASSERT, "maxLevel must be greater than 0");
++    return nerr_raise(NERR_ASSERT, "%s", "maxLevel must be greater than 0");
+ 
+   if(maxLevel >= SKIP_MAXLEVEL)                              /* check limits */
+     maxLevel = SKIP_MAXLEVEL-1;
+@@ -526,9 +526,9 @@
+   skipItem x, y;
+ 
+   if (value == 0)
+-    return nerr_raise(NERR_ASSERT, "value must be non-zero");
++    return nerr_raise(NERR_ASSERT, "%s", "value must be non-zero");
+   if (key == 0 || key == (UINT32)-1)
+-    return nerr_raise(NERR_ASSERT, "key must not be 0 or -1");
++    return nerr_raise(NERR_ASSERT, "%s", "key must not be 0 or -1");
+ 
+   level = list->levelHint;
+ 
Index: files/patch-util__ulist.c
===================================================================
RCS file: files/patch-util__ulist.c
diff -N files/patch-util__ulist.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__ulist.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,27 @@
+--- ./util/ulist.c.orig	2005-06-30 20:52:11.000000000 +0200
++++ ./util/ulist.c	2012-04-23 17:51:17.958055320 +0200
+@@ -61,13 +61,13 @@
+   r_ul = (ULIST *) calloc (1, sizeof (ULIST));
+   if (r_ul == NULL)
+   {
+-    return nerr_raise(NERR_NOMEM, "Unable to create ULIST: Out of memory");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to create ULIST: Out of memory");
+   }
+   r_ul->items = (void **) calloc (size, sizeof(void *));
+   if (r_ul->items == NULL)
+   {
+     free (r_ul);
+-    return nerr_raise(NERR_NOMEM, "Unable to create ULIST: Out of memory");
++    return nerr_raise(NERR_NOMEM, "%s", "Unable to create ULIST: Out of memory");
+   }
+ 
+   r_ul->num = 0;
+@@ -121,7 +121,7 @@
+ NEOERR *uListPop (ULIST *ul, void **data)
+ {
+   if (ul->num == 0)
+-    return nerr_raise(NERR_OUTOFRANGE, "uListPop: empty list");
++    return nerr_raise(NERR_OUTOFRANGE, "%s", "uListPop: empty list");
+ 
+   *data = ul->items[ul->num - 1];
+   ul->num--;
Index: files/patch-util__ulocks.c
===================================================================
RCS file: files/patch-util__ulocks.c
diff -N files/patch-util__ulocks.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-util__ulocks.c	23 Apr 2012 16:08:14 -0000
@@ -0,0 +1,11 @@
+--- ./util/ulocks.c.orig	2005-06-30 21:17:27.000000000 +0200
++++ ./util/ulocks.c	2012-04-23 17:56:39.446509872 +0200
+@@ -93,7 +93,7 @@
+ {
+ 
+   if(lockf(lock, F_LOCK, 0) < 0)
+-    return nerr_raise_errno (NERR_LOCK, "File lock failed");
++    return nerr_raise_errno (NERR_LOCK, "%s", "File lock failed");
+ 
+   return STATUS_OK;
+ }
--- clearsilver-0.10.5.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204231608.q3NG8fnO030729>