use for(;;) instead of while(1) to muffle some visual-C warnings

This commit is contained in:
rlar 2010-09-07 20:07:57 +00:00
parent b1f6da536a
commit 241783d0b5
18 changed files with 47 additions and 27 deletions

View File

@ -1,3 +1,23 @@
2010-09-07 Robert Larice
* src/frontend/inpcom.c ,
* src/frontend/plotting/x11.c ,
* src/frontend/resource.c ,
* src/frontend/subckt.c ,
* src/include/hash.h ,
* src/main.c ,
* src/misc/util.c ,
* src/ngproc2mod.c ,
* src/spicelib/analysis/cktterr.c ,
* src/spicelib/analysis/dctran.c ,
* src/spicelib/devices/ltra/ltratemp.c ,
* src/spicelib/devices/ltra/ltratrun.c ,
* src/winmain.c ,
* src/xspice/evt/evtbackup.c ,
* src/xspice/ipc/ipcaegis.c ,
* src/xspice/mif/mifgetvalue.c ,
* src/xspice/mif/miftrunc.c :
use for(;;) instead of while(1) to muffle some visual-C warnings
2010-09-07 Robert Larice
* examples/tclspice/tcl-testbench2/example.cir ,
* examples/xspice/xspice_c2.cir ,

View File

@ -1100,7 +1100,7 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
#ifdef XSPICE
/* First read in all lines & put them in the struct cc */
while (1) {
for (;;) {
/* If IPC is not enabled, do equivalent of what SPICE did before */
if(! g_ipc.enabled) {
if ( call_depth == 0 && line_count == 0 ) {

View File

@ -955,7 +955,7 @@ X11_Input(REQUEST *request, RESPONSE *response)
ConnectionNumber(display) :
fileno(request->fp);
while (1) {
for (;;) {
/* first read off the queue before doing the select */
while (XtPending()) {

View File

@ -639,7 +639,7 @@ baseaddr(void)
orig_signal = signal(SIGSEGV, (SIGNAL_FUNCTION) fault);
do {
for (;;) {
at = (char *) ((((long)low >> LOG2_PAGESIZE)
+ ((long)high >> LOG2_PAGESIZE))
@ -663,7 +663,7 @@ baseaddr(void)
high = at;
} while (1);
}
(void) signal(SIGSEGV, (SIGNAL_FUNCTION) orig_signal);
return (void *) high;

View File

@ -797,7 +797,7 @@ bxx_printf(struct bxx_buffer *t, const char *fmt, ...)
{
va_list ap;
while(1) {
for (;;) {
int ret;
int size = t->limit - t->dst;
va_start(ap, fmt);
@ -967,7 +967,7 @@ translate(struct line *deck, char *formal, char *actual, char *scname, char *sub
next_name = MIFgettok(&s);
while(1) {
for (;;) {
/* rotate the tokens and get the the next one */
@ -1779,7 +1779,7 @@ devmodtranslate(struct line *deck, char *subname)
/* now do remainder of line. */
next_name = gettok(&t);
while(1) {
for (;;) {
name = next_name;
next_name = gettok(&t);
@ -2075,7 +2075,7 @@ devmodtranslate(struct line *deck, char *subname)
/* now do remainder of line. */
next_name = gettok(&t);
while(1) {
for (;;) {
name = next_name;
next_name = gettok(&t);
if((next_name == NULL) ||

View File

@ -144,7 +144,7 @@ we want to intentionally assign it. The compiler is warning unnecessarily.
char *string ; \
hsum = 0 ; \
string = (char *) str ; \
while(1) { \
for (;;) { \
c = *string ; \
string++ ; \
if( c == 0) { \

View File

@ -552,7 +552,7 @@ app_rl_readlines(void)
#endif
/* note that we want some mechanism to detect ctrl-D and expand it to exit */
while (1) {
for (;;) {
history_set_pos(history_length);
SETJMP(jbuf, 1); /* Set location to jump to after handling SIGINT (ctrl-C) */
@ -791,7 +791,7 @@ main(int argc, char **argv)
TausSeed();
/* --- Process command line options --- */
while (1) {
for(;;) {
int option_index = 0;
static struct option long_options[] = {
{"help", 0, 0, 'h'},

View File

@ -37,7 +37,7 @@ canonicalize_pathname(char *path)
/* Walk along RESULT looking for things to compact. */
i = 0;
while (1) {
for (;;) {
if (!result[i])
break;

View File

@ -95,7 +95,7 @@ main(void) {
exit(1);
}
INPcaseFix(typeline);
while(1) {
for (;;) {
while(*typeline == ' ' || *typeline == '\t' || *typeline == ',' ||
*typeline == '\n' ) {
typeline ++;

View File

@ -48,7 +48,7 @@ CKTterr(int qcap, CKTcircuit *ckt, double *timeStep)
deltmp[i] = ckt->CKTdeltaOld[i];
}
j = ckt->CKTorder;
while(1) {
for (;;) {
for(i=0;i <= j;i++) {
diff[i] = (diff[i] - diff[i+1])/deltmp[i];
}

View File

@ -598,7 +598,7 @@ resume:
/* gtri - begin - wbk - Modify Breakpoint stuff */
/* Throw out any permanent breakpoint times <= current time */
while(1) {
for (;;) {
#ifdef STEPDEBUG
printf(" brk_pt: %g ckt_time: %g ckt_min_break: %g\n",*(ckt->CKTbreaks), ckt->CKTtime, ckt->CKTminBreak);
#endif
@ -702,7 +702,7 @@ resume:
ckt->CKTstates[0] = temp;
/* 600 */
while (1) {
for (;;) {
#ifdef CLUSTER
redostep = 1;
#endif

View File

@ -100,7 +100,7 @@ LTRAtemp(GENmodel *inModel, CKTcircuit *ckt)
y1small = LTRArlcH2Func(xsmall, model->LTRAtd, model->LTRAalpha, model->LTRAbeta);
y2small = LTRArlcH3dashFunc(xsmall, model->LTRAtd, model->LTRAbeta, model->LTRAbeta);
iters = 0;
while (1) {
for (;;) {
iters++;
y1big = LTRArlcH2Func(xbig, model->LTRAtd, model->LTRAalpha, model->LTRAbeta);

View File

@ -144,7 +144,7 @@ LTRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
x = ckt->CKTtime;
y = current_lte;
while (1) {
for (;;) {
deriv_delta = 0.01 * (x - *(ckt->CKTtimePoints +
ckt->CKTtimeIndex));

View File

@ -1023,13 +1023,13 @@ int fp_u_t_s(const char * __s, FILE * __stream)
int c = SE;
if (!__s) return EOF;
do {
for (;;) {
if (*__s) {
c = *__s++;
fp_u_t_c(c, __stream);
} else
return c;
} while (TRUE);
}
} else
return fputs( __s, __stream);
}

View File

@ -163,7 +163,7 @@ static void EVTbackup_node_data(
/* for tail, and splice later data into the free list */
node_ptr = node_data->last_step[node_index];
node = *node_ptr;
while(1) {
for (;;) {
if((node->next == NULL) || (node->next->step > new_time)) {
/* Splice rest of list, if any, into free list */
@ -252,7 +252,7 @@ static void EVTbackup_state_data(
/* for tail, and splice later data into the free list */
state_ptr = state_data->last_step[inst_index];
state = *state_ptr;
while(1) {
for (;;) {
if((state->next == NULL) || (state->next->step > new_time)) {
/* Splice rest of list, if any, into free list */
@ -333,7 +333,7 @@ static void EVTbackup_msg_data(
/* for tail, and splice later data into the free list */
msg_ptr = msg_data->last_step[port_index];
msg = *msg_ptr;
while(1) {
for (;;) {
if((msg->next == NULL) || (msg->next->step > new_time)) {
/* Splice rest of list, if any, into free list */

View File

@ -157,7 +157,7 @@ Ipc_Status_t ipc_transport_get_line (str, len, wait)
assert ((mbx_state == IPC_MBX_CONNECTED_TO_CLIENT) ||
(mbx_state == IPC_MBX_INITIALIZED));
do {
for (;;) {
if (wait == IPC_WAIT) {
mbx_$get_rec (mbx_handle, &mbx_recieve_msg_buf, mbx_$serv_msg_max,
&mbx_ret_ptr, &mbx_ret_len, &status);
@ -231,7 +231,7 @@ Ipc_Status_t ipc_transport_get_line (str, len, wait)
fprintf (stderr, "ERROR: IPC: Bad message type (0x%x) recieved\n",
mbx_ret_ptr->mt);
}
} while (1);
}
return IPC_STATUS_ERROR;
}

View File

@ -126,7 +126,7 @@ MIFgetValue (
/* now get the values into val */
while(1) {
for (;;) {
token = MIFget_token(line, &token_type);

View File

@ -193,7 +193,7 @@ static void MIFterr(
deltmp[i] = ckt->CKTdeltaOld[i];
}
j = ckt->CKTorder;
while(1) {
for (;;) {
for(i=0;i <= j;i++) {
diff[i] = (diff[i] - diff[i+1])/deltmp[i];
}