branch Attitude Adjustment packages
[12.09/packages.git] / libs / clearsilver / patches / 100-remove_warnings.patch
1 --- a/cgi/cgi.c
2 +++ b/cgi/cgi.c
3 @@ -698,7 +698,7 @@ NEOERR *cgi_parse (CGI *cgi)
4      x = 0;
5      while (x < len)
6      {
7 -      if (len-x > sizeof(buf))
8 +      if (len-x > (int) sizeof(buf))
9         cgiwrap_read (buf, sizeof(buf), &r);
10        else
11         cgiwrap_read (buf, len - x, &r);
12 @@ -1363,6 +1363,8 @@ void cgi_neo_error (CGI *cgi, NEOERR *er
13  {
14    STRING str;
15  
16 +  UNUSED(cgi);
17 +
18    string_init(&str);
19    cgiwrap_writef("Status: 500\n");
20    cgiwrap_writef("Content-Type: text/html\n\n");
21 @@ -1377,6 +1379,8 @@ void cgi_error (CGI *cgi, const char *fm
22  {
23    va_list ap;
24  
25 +  UNUSED(cgi);
26 +
27    cgiwrap_writef("Status: 500\n");
28    cgiwrap_writef("Content-Type: text/html\n\n");
29    cgiwrap_writef("<html><body>\nAn error occured:<pre>");
30 @@ -1536,6 +1540,8 @@ NEOERR *cgi_cookie_set (CGI *cgi, const
31    STRING str;
32    char my_time[256];
33  
34 +  UNUSED(cgi);
35 +
36    if (path == NULL) path = "/";
37  
38    string_init(&str);
39 @@ -1584,6 +1590,8 @@ NEOERR *cgi_cookie_set (CGI *cgi, const
40  NEOERR *cgi_cookie_clear (CGI *cgi, const char *name, const char *domain,
41                            const char *path)
42  {
43 +  UNUSED(cgi);
44 +
45    if (path == NULL) path = "/";
46    if (domain)
47    {
48 --- a/cgi/cgiwrap.c
49 +++ b/cgi/cgiwrap.c
50 @@ -14,6 +14,9 @@
51  #if HAVE_FEATURES_H
52  #include <features.h>
53  #endif
54 +#ifdef __UCLIBC__
55 +#include <unistd.h>
56 +#endif
57  #include <stdarg.h>
58  #include <stdio.h>
59  #include <stdlib.h>
60 --- a/cgi/date.c
61 +++ b/cgi/date.c
62 @@ -94,7 +94,7 @@ NEOERR *export_date_tm (HDF *data, const
63    if (err) return nerr_pass(err);
64    err = hdf_set_int_value (obj, "wday", ttm->tm_wday);
65    if (err) return nerr_pass(err);
66 -  // neo_tz_offset() returns offset from GMT in seconds
67 +  /* neo_tz_offset() returns offset from GMT in seconds */
68    tzoffset_seconds = neo_tz_offset(ttm);
69    tzoffset = tzoffset_seconds / 60;
70    if (tzoffset < 0)
71 @@ -109,12 +109,12 @@ NEOERR *export_date_tm (HDF *data, const
72    return STATUS_OK;
73  }
74  
75 -NEOERR *export_date_time_t (HDF *data, const char *prefix, const char *timezone,
76 +NEOERR *export_date_time_t (HDF *data, const char *prefix, const char *tz,
77                              time_t tt)
78  {
79    struct tm ttm;
80  
81 -  neo_time_expand (tt, timezone, &ttm);
82 +  neo_time_expand (tt, tz, &ttm);
83    return nerr_pass (export_date_tm (data, prefix, &ttm));
84  }
85  
86 --- a/cgi/date.h
87 +++ b/cgi/date.h
88 @@ -17,7 +17,7 @@
89  __BEGIN_DECLS
90  
91  NEOERR *export_date_tm (HDF *obj, const char *prefix, struct tm *ttm);
92 -NEOERR *export_date_time_t (HDF *obj, const char *prefix, const char *timezone, 
93 +NEOERR *export_date_time_t (HDF *obj, const char *prefix, const char *tz,
94                              time_t tt);
95  
96  __END_DECLS
97 --- a/cgi/html.c
98 +++ b/cgi/html.c
99 @@ -774,7 +774,7 @@ NEOERR *html_strip_alloc(const char *src
100         }
101         else
102         {
103 -         if (ampl < sizeof(amp)-1)
104 +         if (ampl < (int) sizeof(amp)-1)
105             amp[ampl++] = tolower(src[x]);
106           else
107           {
108 --- a/cgi/rfc2388.c
109 +++ b/cgi/rfc2388.c
110 @@ -155,14 +155,14 @@ static NEOERR * _read_line (CGI *cgi, ch
111      ofs = cgi->readlen - cgi->nl;
112      memmove(cgi->buf, cgi->buf + cgi->nl, ofs);
113    }
114 -  // Read either as much buffer space as we have left, or up to 
115 -  // the amount of data remaining according to Content-Length
116 -  // If there is no Content-Length, just use the buffer space, but recognize
117 -  // that it might not work on some servers or cgiwrap implementations.
118 -  // Some servers will close their end of the stdin pipe, so cgiwrap_read
119 -  // will return if we ask for too much.  Techically, not including
120 -  // Content-Length is against the HTTP spec, so we should consider failing
121 -  // earlier if we don't have a length.
122 +  /* Read either as much buffer space as we have left, or up to
123 +   * the amount of data remaining according to Content-Length
124 +   * If there is no Content-Length, just use the buffer space, but recognize
125 +   * that it might not work on some servers or cgiwrap implementations.
126 +   * Some servers will close their end of the stdin pipe, so cgiwrap_read
127 +   * will return if we ask for too much.  Techically, not including
128 +   * Content-Length is against the HTTP spec, so we should consider failing
129 +   * earlier if we don't have a length. */
130    to_read = cgi->buflen - ofs;
131    if (cgi->data_expected && (to_read > cgi->data_expected - cgi->data_read))
132    {
133 --- a/cs/csparse.c
134 +++ b/cs/csparse.c
135 @@ -59,7 +59,7 @@ typedef enum
136    ST_DEF = 1<<6,
137    ST_LOOP =  1<<7,
138    ST_ALT = 1<<8,
139 -  ST_ESCAPE = 1<<9,
140 +  ST_ESCAPE = 1<<9
141  } CS_STATE;
142  
143  #define ST_ANYWHERE (ST_EACH | ST_WITH | ST_ELSE | ST_IF | ST_GLOBAL | ST_DEF | ST_LOOP | ST_ALT | ST_ESCAPE)
144 @@ -178,7 +178,8 @@ CS_CMDS Commands[] = {
145      escape_parse, escape_eval, 1},
146    {"/escape",    sizeof("/escape")-1,    ST_ESCAPE,     ST_POP,
147      end_parse, skip_eval, 1},
148 -  {NULL},
149 +  {NULL,    0,    0,    0,
150 +       NULL, NULL, 0}
151  };
152  
153  /* Possible Config.VarEscapeMode values */
154 @@ -193,7 +194,7 @@ CS_ESCAPE_MODES EscapeModes[] = {
155    {"html", NEOS_ESCAPE_HTML},
156    {"js",   NEOS_ESCAPE_SCRIPT},
157    {"url",  NEOS_ESCAPE_URL},
158 -  {NULL},
159 +  {NULL,   0}
160  };
161  
162  
163 @@ -1154,7 +1155,7 @@ static char *token_list (CSTOKEN *tokens
164      {
165        t = snprintf(p, buflen, "%s%d:%s", i ? "  ":"", i, expand_token_type(tokens[i].type, 0));
166      }
167 -    if (t == -1 || t >= buflen) return buf;
168 +    if (t == -1 || t >= (int) buflen) return buf;
169      buflen -= t;
170      p += t;
171    }
172 @@ -2567,6 +2568,9 @@ static NEOERR *else_parse (CSPARSE *pars
173    NEOERR *err;
174    STACK_ENTRY *entry;
175  
176 +  UNUSED(cmd);
177 +  UNUSED(arg);
178 +
179    /* ne_warn ("else"); */
180    err = uListGet (parse->stack, -1, (void *)&entry);
181    if (err != STATUS_OK) return nerr_pass(err);
182 @@ -2600,6 +2604,9 @@ static NEOERR *endif_parse (CSPARSE *par
183    NEOERR *err;
184    STACK_ENTRY *entry;
185  
186 +  UNUSED(cmd);
187 +  UNUSED(arg);
188 +
189    /* ne_warn ("endif"); */
190    err = uListGet (parse->stack, -1, (void *)&entry);
191    if (err != STATUS_OK) return nerr_pass(err);
192 @@ -2781,6 +2788,9 @@ static NEOERR *end_parse (CSPARSE *parse
193    NEOERR *err;
194    STACK_ENTRY *entry;
195  
196 +  UNUSED(cmd);
197 +  UNUSED(arg);
198 +
199    err = uListGet (parse->stack, -1, (void *)&entry);
200    if (err != STATUS_OK) return nerr_pass(err);
201  
202 @@ -2796,6 +2806,8 @@ static NEOERR *include_parse (CSPARSE *p
203    int flags = 0;
204    CSARG arg1, val;
205  
206 +  UNUSED(cmd);
207 +
208    memset(&arg1, 0, sizeof(CSARG));
209    if (arg[0] == '!')
210      flags |= CSF_REQUIRED;
211 @@ -3511,6 +3523,8 @@ static NEOERR *loop_eval (CSPARSE *parse
212  
213  static NEOERR *skip_eval (CSPARSE *parse, CSTREE *node, CSTREE **next)
214  {
215 +  UNUSED(parse);
216 +
217    *next = node->next;
218    return STATUS_OK;
219  }
220 @@ -3651,6 +3665,8 @@ static NEOERR * _builtin_subcount(CSPARS
221    int count = 0;
222    CSARG val;
223  
224 +  UNUSED(csf);
225 +
226    memset(&val, 0, sizeof(val));
227    err = eval_expr(parse, args, &val);
228    if (err) return nerr_pass(err);
229 @@ -3683,6 +3699,8 @@ static NEOERR * _builtin_str_length(CSPA
230    NEOERR *err;
231    CSARG val;
232  
233 +  UNUSED(csf);
234 +
235    memset(&val, 0, sizeof(val));
236    err = eval_expr(parse, args, &val);
237    if (err) return nerr_pass(err);
238 @@ -3706,6 +3724,8 @@ static NEOERR * _builtin_str_crc(CSPARSE
239    NEOERR *err;
240    CSARG val;
241  
242 +  UNUSED(csf);
243 +
244    memset(&val, 0, sizeof(val));
245    err = eval_expr(parse, args, &val);
246    if (err) return nerr_pass(err);
247 @@ -3731,6 +3751,8 @@ static NEOERR * _builtin_str_find(CSPARS
248    char *substr = NULL;
249    char *pstr = NULL;
250  
251 +  UNUSED(csf);
252 +
253    result->op_type = CS_TYPE_NUM;
254    result->n = -1;
255  
256 @@ -3758,6 +3780,8 @@ static NEOERR * _builtin_name(CSPARSE *p
257    HDF *obj;
258    CSARG val;
259  
260 +  UNUSED(csf);
261 +
262    memset(&val, 0, sizeof(val));
263    err = eval_expr(parse, args, &val);
264    if (err) return nerr_pass(err);
265 @@ -3790,6 +3814,8 @@ static NEOERR * _builtin_first(CSPARSE *
266    char *c;
267    CSARG val;
268  
269 +  UNUSED(csf);
270 +
271    memset(&val, 0, sizeof(val));
272    err = eval_expr(parse, args, &val);
273    if (err) return nerr_pass(err);
274 @@ -3819,6 +3845,8 @@ static NEOERR * _builtin_last(CSPARSE *p
275    char *c;
276    CSARG val;
277  
278 +  UNUSED(csf);
279 +
280    memset(&val, 0, sizeof(val));
281    err = eval_expr(parse, args, &val);
282    if (err) return nerr_pass(err);
283 @@ -3853,6 +3881,8 @@ static NEOERR * _builtin_abs (CSPARSE *p
284    int n1 = 0;
285    CSARG val;
286  
287 +  UNUSED(csf);
288 +
289    memset(&val, 0, sizeof(val));
290    err = eval_expr(parse, args, &val);
291    if (err) return nerr_pass(err);
292 @@ -3873,6 +3903,8 @@ static NEOERR * _builtin_max (CSPARSE *p
293    long int n1 = 0;
294    long int n2 = 0;
295  
296 +  UNUSED(csf);
297 +
298    result->op_type = CS_TYPE_NUM;
299    result->n = 0;
300  
301 @@ -3891,6 +3923,8 @@ static NEOERR * _builtin_min (CSPARSE *p
302    long int n1 = 0;
303    long int n2 = 0;
304  
305 +  UNUSED(csf);
306 +
307    result->op_type = CS_TYPE_NUM;
308    result->n = 0;
309  
310 @@ -3910,6 +3944,8 @@ static NEOERR * _builtin_str_slice (CSPA
311    long int e = 0;
312    size_t len;
313  
314 +  UNUSED(csf);
315 +
316    result->op_type = CS_TYPE_STRING;
317    result->s = "";
318  
319 @@ -3921,9 +3957,9 @@ static NEOERR * _builtin_str_slice (CSPA
320    if (b < 0 && e == 0) e = len;
321    if (b < 0) b += len;
322    if (e < 0) e += len;
323 -  if (e > len) e = len;
324 +  if (e > (int) len) e = len;
325    /* Its the whole string */
326 -  if (b == 0 && e == len)
327 +  if (b == 0 && e == (int) len)
328    {
329      result->s = s;
330      result->alloc = 1;
331 @@ -4179,10 +4215,10 @@ static NEOERR *cs_init_internal (CSPARSE
332      my_parse->global_hdf = parent->global_hdf;
333      my_parse->fileload = parent->fileload;
334      my_parse->fileload_ctx = parent->fileload_ctx;
335 -    // This should be safe since locals handling is done entirely local to the
336 -    // eval functions, not globally by the parse handling.  This should
337 -    // pass the locals down to the new parse context to make locals work with
338 -    // lvar
339 +    /* This should be safe since locals handling is done entirely local to the
340 +     * eval functions, not globally by the parse handling.  This should
341 +     * pass the locals down to the new parse context to make locals work with
342 +     * lvar */
343      my_parse->locals = parent->locals;
344      my_parse->parent = parent;
345  
346 --- a/util/dict.c
347 +++ b/util/dict.c
348 @@ -87,6 +87,8 @@ static NEOERR *dictNewItem(dictCtx dict,
349  {
350    dictItemPtr my_item;
351  
352 +  UNUSED(dict);
353 +
354    if (item != NULL)
355      *item = NULL;
356  
357 --- a/util/neo_date.h
358 +++ b/util/neo_date.h
359 @@ -17,10 +17,10 @@
360  __BEGIN_DECLS
361  
362  /* UTC time_t -> struct tm in local timezone */
363 -void neo_time_expand (const time_t tt, const char *timezone, struct tm *ttm);
364 +void neo_time_expand (const time_t tt, const char *tz, struct tm *ttm);
365  
366  /* local timezone struct tm -> time_t UTC */
367 -time_t neo_time_compact (struct tm *ttm, const char *timezone);
368 +time_t neo_time_compact (struct tm *ttm, const char *tz);
369  
370  /* To be portable... in seconds */
371  long neo_tz_offset(struct tm *ttm);
372 --- a/util/neo_files.c
373 +++ b/util/neo_files.c
374 @@ -35,7 +35,7 @@ NEOERR *ne_mkdirs (const char *path, mod
375  
376    strncpy (mypath, path, sizeof(mypath));
377    x = strlen(mypath);
378 -  if ((x < sizeof(mypath)) && (mypath[x-1] != '/'))
379 +  if ((x < (int) sizeof(mypath)) && (mypath[x-1] != '/'))
380    {
381      mypath[x] = '/';
382      mypath[x+1] = '\0';
383 --- a/util/neo_hash.c
384 +++ b/util/neo_hash.c
385 @@ -57,7 +57,7 @@ void ne_hash_destroy (NE_HASH **hash)
386  
387    my_hash = *hash;
388  
389 -  for (x = 0; x < my_hash->size; x++)
390 +  for (x = 0; x < (int) my_hash->size; x++)
391    {
392      node = my_hash->nodes[x];
393      while (node)
394 @@ -111,16 +111,16 @@ void *ne_hash_lookup(NE_HASH *hash, void
395  
396  void *ne_hash_remove(NE_HASH *hash, void *key)
397  {
398 -  NE_HASHNODE **node, *remove;
399 +  NE_HASHNODE **node, *rem;
400    void *value = NULL;
401  
402    node = _hash_lookup_node(hash, key, NULL);
403    if (*node)
404    {
405 -    remove = *node;
406 -    *node = remove->next;
407 -    value = remove->value;
408 -    free(remove);
409 +    rem = *node;
410 +    *node = rem->next;
411 +    value = rem->value;
412 +    free(rem);
413      hash->num--;
414    }
415    return value;
416 @@ -233,7 +233,7 @@ static NEOERR *_hash_resize(NE_HASH *has
417    hash->size = hash->size*2;
418  
419    /* Initialize new parts */
420 -  for (x = orig_size; x < hash->size; x++)
421 +  for (x = orig_size; x < (int) hash->size; x++)
422    {
423      hash->nodes[x] = NULL;
424    }
425 @@ -248,7 +248,7 @@ static NEOERR *_hash_resize(NE_HASH *has
426          entry; 
427          entry = prev ? prev->next : hash->nodes[x]) 
428      {
429 -      if ((entry->hashv & hash_mask) != x)
430 +      if ((int) (entry->hashv & hash_mask) != x)
431        {
432         if (prev)
433         {
434 --- a/util/neo_hdf.c
435 +++ b/util/neo_hdf.c
436 @@ -54,7 +54,7 @@ static UINT32 hash_hdf_hash(const void *
437  }
438  
439  static NEOERR *_alloc_hdf (HDF **hdf, const char *name, size_t nlen, 
440 -                           const char *value, int dup, int wf, HDF *top)
441 +                           const char *value, int dupl, int wf, HDF *top)
442  {
443    *hdf = calloc (1, sizeof (HDF));
444    if (*hdf == NULL)
445 @@ -80,7 +80,7 @@ static NEOERR *_alloc_hdf (HDF **hdf, co
446    }
447    if (value != NULL)
448    {
449 -    if (dup)
450 +    if (dupl)
451      {
452        (*hdf)->alloc_value = 1;
453        (*hdf)->value = strdup(value);
454 @@ -233,7 +233,7 @@ static int _walk_hdf (HDF *hdf, const ch
455  
456    n = name;
457    s = strchr (n, '.');
458 -  x = (s == NULL) ? strlen(n) : s - n;
459 +  x = (s == NULL) ? (int) strlen(n) : s - n;
460  
461    while (1)
462    {
463 @@ -279,7 +279,7 @@ static int _walk_hdf (HDF *hdf, const ch
464      }
465      n = s + 1;
466      s = strchr (n, '.');
467 -    x = (s == NULL) ? strlen(n) : s - n;
468 +    x = (s == NULL) ? (int) strlen(n) : s - n;
469    } 
470    if (hp->link)
471    {
472 @@ -570,7 +570,7 @@ NEOERR* _hdf_hash_level(HDF *hdf)
473  }
474  
475  static NEOERR* _set_value (HDF *hdf, const char *name, const char *value, 
476 -                           int dup, int wf, int link, HDF_ATTR *attr, 
477 +                           int dupl, int wf, int lnk, HDF_ATTR *attr, 
478                             HDF **set_node)
479  {
480    NEOERR *err;
481 @@ -615,7 +615,7 @@ static NEOERR* _set_value (HDF *hdf, con
482        hdf->alloc_value = 0;
483        hdf->value = NULL;
484      }
485 -    else if (dup)
486 +    else if (dupl)
487      {
488        hdf->alloc_value = 1;
489        hdf->value = strdup(value);
490 @@ -650,7 +650,7 @@ static NEOERR* _set_value (HDF *hdf, con
491      strcpy(new_name, hdf->value);
492      strcat(new_name, ".");
493      strcat(new_name, name);
494 -    err = _set_value (hdf->top, new_name, value, dup, wf, link, attr, set_node);
495 +    err = _set_value (hdf->top, new_name, value, dupl, wf, lnk, attr, set_node);
496      free(new_name);
497      return nerr_pass(err);
498    }
499 @@ -719,8 +719,8 @@ skip_search:
500        }
501        else
502        {
503 -       err = _alloc_hdf (&hp, n, x, value, dup, wf, hdf->top);
504 -       if (link) hp->link = 1;
505 +       err = _alloc_hdf (&hp, n, x, value, dupl, wf, hdf->top);
506 +       if (lnk) hp->link = 1;
507         else hp->link = 0;
508         hp->attr = attr;
509        }
510 @@ -770,7 +770,7 @@ skip_search:
511           hp->alloc_value = 0;
512           hp->value = NULL;
513         }
514 -       else if (dup)
515 +       else if (dupl)
516         {
517           hp->alloc_value = 1;
518           hp->value = strdup(value);
519 @@ -784,7 +784,7 @@ skip_search:
520           hp->value = (char *)value;
521         }
522        }
523 -      if (link) hp->link = 1;
524 +      if (lnk) hp->link = 1;
525        else hp->link = 0;
526      }
527      else if (hp->link) 
528 @@ -796,7 +796,7 @@ skip_search:
529        }
530        strcpy(new_name, hp->value);
531        strcat(new_name, s);
532 -      err = _set_value (hdf->top, new_name, value, dup, wf, link, attr, set_node);
533 +      err = _set_value (hdf->top, new_name, value, dupl, wf, lnk, attr, set_node);
534        free(new_name);
535        return nerr_pass(err);
536      }
537 @@ -1267,6 +1267,8 @@ NEOERR* hdf_dump(HDF *hdf, const char *p
538  
539  NEOERR* hdf_dump_format (HDF *hdf, int lvl, FILE *fp)
540  {
541 +  UNUSED(lvl);
542 +
543    return nerr_pass(hdf_dump_cb(hdf, "", DUMP_TYPE_PRETTY, 0, fp, _fp_dump_cb));
544  }
545  
546 @@ -1357,7 +1359,7 @@ static int _copy_line (const char **s, c
547    int x = 0;
548    const char *st = *s;
549  
550 -  while (*st && x < buf_len-1)
551 +  while (*st && x < (int) buf_len-1)
552    {
553      buf[x++] = *st;
554      if (*st++ == '\n') break;
555 @@ -1398,17 +1400,17 @@ static NEOERR *_copy_line_advance(const
556  
557  char *_strndup(const char *s, int len) {
558    int x;
559 -  char *dup; 
560 +  char *t;
561    if (s == NULL) return NULL;
562 -  dup = (char *) malloc(len+1);
563 -  if (dup == NULL) return NULL;
564 +  t = (char *) malloc(len+1);
565 +  if (t == NULL) return NULL;
566    for (x = 0; x < len && s[x]; x++)
567    {
568 -    dup[x] = s[x];
569 +    t[x] = s[x];
570    }
571 -  dup[x] = '\0';
572 -  dup[len] = '\0';
573 -  return dup;
574 +  t[x] = '\0';
575 +  t[len] = '\0';
576 +  return t;
577  }
578  
579  /* attributes are of the form [key1, key2, key3=value, key4="repr"] */
580 --- a/util/neo_misc.c
581 +++ b/util/neo_misc.c
582 @@ -34,7 +34,7 @@ void ne_vwarn (const char *fmt, va_list
583  
584    localtime_r(&now, &my_tm);
585  
586 -  strftime(tbuf, sizeof(tbuf), "%m/%d %T", &my_tm);
587 +  strftime(tbuf, sizeof(tbuf), "%m/%d %H:%M:%S", &my_tm);
588  
589    vsnprintf (buf, sizeof(buf), fmt, ap);
590    len = strlen(buf);
591 --- a/util/neo_misc.h
592 +++ b/util/neo_misc.h
593 @@ -106,6 +106,10 @@ typedef char BOOL;
594  #define MIN(x,y)        (((x) < (y)) ? (x) : (y))
595  #endif
596  
597 +#ifndef UNUSED
598 +#define UNUSED(x)        ((void)(x))
599 +#endif
600 +
601  #ifndef TRUE
602  #define TRUE 1
603  #endif
604 --- a/util/neo_net.c
605 +++ b/util/neo_net.c
606 @@ -489,7 +489,7 @@ static NEOERR *_ne_net_read_int(NSOCK *s
607    char buf[32];
608    char *ep = NULL;
609  
610 -  while (x < sizeof(buf))
611 +  while (x < (int) sizeof(buf))
612    {
613      while (sock->il - sock->ib > 0)
614      {
615 --- a/util/neo_server.c
616 +++ b/util/neo_server.c
617 @@ -104,6 +104,8 @@ static int ShutdownPending = 0;
618  
619  static void sig_term(int sig)
620  {
621 +  UNUSED(sig);
622 +
623    ShutdownPending = 1;
624    ne_net_shutdown();
625  }
626 --- a/util/neo_str.c
627 +++ b/util/neo_str.c
628 @@ -592,11 +592,11 @@ char *repr_string_alloc (const char *s)
629    return rs;
630  }
631  
632 -// List of all characters that must be escaped
633 -// List based on http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
634 +/* List of all characters that must be escaped
635 + * List based on http://www.blooberry.com/indexdot/html/topics/urlencoding.htm */
636  static char EscapedChars[] = "$&+,/:;=?@ \"<>#%{}|\\^~[]`'";
637  
638 -// Check if a single character needs to be escaped
639 +/* Check if a single character needs to be escaped */
640  static BOOL is_reserved_char(char c)
641  {
642    int i = 0;
643 @@ -835,15 +835,15 @@ NEOERR *neos_url_validate (const char *i
644    colonpos = memchr(in, ':', i);
645  
646    if (colonpos == NULL) {
647 -    // no scheme in 'in': so this is a relative url
648 +    /* no scheme in 'in': so this is a relative url */
649      valid = 1;
650    }
651    else {
652 -    for (i = 0; i < num_protocols; i++)
653 +    for (i = 0; (int) i < num_protocols; i++)
654      {
655        if ((inlen >= strlen(URL_PROTOCOLS[i])) && 
656            strncmp(in, URL_PROTOCOLS[i], strlen(URL_PROTOCOLS[i])) == 0) {
657 -        // 'in' starts with one of the allowed protocols
658 +        /* 'in' starts with one of the allowed protocols */
659          valid = 1;
660          break;
661        }
662 @@ -854,7 +854,7 @@ NEOERR *neos_url_validate (const char *i
663    if (valid)
664      return neos_html_escape(in, inlen, esc);
665  
666 -  // 'in' contains an unsupported scheme, replace with '#' 
667 +  /* 'in' contains an unsupported scheme, replace with '#' */
668    string_init(&out_s);
669    err = string_append (&out_s, "#");
670    if (err) return nerr_pass (err);
671 --- a/util/skiplist.c
672 +++ b/util/skiplist.c
673 @@ -409,7 +409,7 @@ NEOERR *skipNewList(skipList *skip, int
674      if (err != STATUS_OK) break;
675  
676      for(i = 0;                                       /* init header and tail */
677 -        i <= list->maxLevel;
678 +        i <= (UINT32) list->maxLevel;
679          i++) {
680        list->tail->next[i] = NULL;
681        list->header->next[i] = list->tail;
682 @@ -444,7 +444,7 @@ static void skipFreeAllItems(skipList li
683    }
684                                                      /* clear header pointers */
685    for(i = 0;
686 -      i <= list->maxLevel;
687 +      i <= (UINT32) list->maxLevel;
688        i++)
689      list->header->next[i] = list->tail;
690