Skip to content

Commit

Permalink
refs #100629 Merge remote-tracking branch 'origin/100629-warnings'
Browse files Browse the repository at this point in the history
* origin/100629-warnings:
  Refs #100629  Fix remaining sunstudio warnings, plus one from clang.
  • Loading branch information
David J. Kordsmeier committed May 4, 2013
2 parents 5f5efc3 + d34180f commit dbd6857
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apps/HttpProxy/HttpProxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3261,12 +3261,13 @@ ShowStats(MainBase mb) {
flushLog(f);
}

int ever = 1;
static int
DispatchLoop(MainBase mb) {

int waitMillis = 1;
int res = 0;
for (;;) {
for (;ever;) {
uint64_t nChanges = mb->nChanges;

TrySelect(mb);
Expand Down
2 changes: 1 addition & 1 deletion csrc/ccnd/ccnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ ccnd_generate_face_guid(struct ccnd_handle *h, struct face *face, int size,
range = ~0;
else {
range = 0;
for (i = i; i < size; i++)
for (; i < size; i++)
range = (range << 8) + hi[i] - lo[i];
}
if (range < 2)
Expand Down
7 changes: 3 additions & 4 deletions csrc/lib/ccnbtreetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
*/
/*
* Copyright (C) 2011-2012 Palo Alto Research Center, Inc.
* Copyright (C) 2011-2013 Palo Alto Research Center, Inc.
*
* This work is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
Expand Down Expand Up @@ -37,18 +37,17 @@
#include <ccn/hashtb.h>
#include <ccn/uri.h>

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

static int
static void
fatal(const char *fn, int lineno)
{
char buf[80] = {0};
snprintf(buf, sizeof(buf)-1, "OOPS - function %s, line %d", fn, lineno);
perror(buf);
exit(1);
return(0);
}

/**
Expand Down

0 comments on commit dbd6857

Please sign in to comment.