Skip to content

Commit d34180f

Browse files
author
Michael Plass
committed
Refs #100629 Fix remaining sunstudio warnings, plus one from clang.
1 parent e682e94 commit d34180f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

apps/HttpProxy/HttpProxy.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -3261,12 +3261,13 @@ ShowStats(MainBase mb) {
32613261
flushLog(f);
32623262
}
32633263

3264+
int ever = 1;
32643265
static int
32653266
DispatchLoop(MainBase mb) {
32663267

32673268
int waitMillis = 1;
32683269
int res = 0;
3269-
for (;;) {
3270+
for (;ever;) {
32703271
uint64_t nChanges = mb->nChanges;
32713272

32723273
TrySelect(mb);

csrc/ccnd/ccnd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ ccnd_generate_face_guid(struct ccnd_handle *h, struct face *face, int size,
587587
range = ~0;
588588
else {
589589
range = 0;
590-
for (i = i; i < size; i++)
590+
for (; i < size; i++)
591591
range = (range << 8) + hi[i] - lo[i];
592592
}
593593
if (range < 2)

csrc/lib/ccnbtreetest.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*/
77
/*
8-
* Copyright (C) 2011-2012 Palo Alto Research Center, Inc.
8+
* Copyright (C) 2011-2013 Palo Alto Research Center, Inc.
99
*
1010
* This work is free software; you can redistribute it and/or modify it under
1111
* the terms of the GNU General Public License version 2 as published by the
@@ -37,18 +37,17 @@
3737
#include <ccn/hashtb.h>
3838
#include <ccn/uri.h>
3939

40-
#define FAILIF(cond) do {} while ((cond) && fatal(__func__, __LINE__))
40+
#define FAILIF(cond) do if (cond) fatal(__func__, __LINE__); while (0)
4141
#define CHKSYS(res) FAILIF((res) == -1)
4242
#define CHKPTR(p) FAILIF((p) == NULL)
4343

44-
static int
44+
static void
4545
fatal(const char *fn, int lineno)
4646
{
4747
char buf[80] = {0};
4848
snprintf(buf, sizeof(buf)-1, "OOPS - function %s, line %d", fn, lineno);
4949
perror(buf);
5050
exit(1);
51-
return(0);
5251
}
5352

5453
/**

0 commit comments

Comments
 (0)