swallow type conversion warnings
This commit is contained in:
parent
07fd87771c
commit
451f88c5e1
21
ChangeLog
21
ChangeLog
|
|
@ -1,3 +1,14 @@
|
||||||
|
2011-06-24 Robert Larice
|
||||||
|
* src/main.c ,
|
||||||
|
* src/frontend/com_ahelp.c ,
|
||||||
|
* src/frontend/inpcom.c ,
|
||||||
|
* src/frontend/numparam/mystring.c ,
|
||||||
|
* src/frontend/numparam/xpressn.c ,
|
||||||
|
* src/frontend/trannoise/wallace.c ,
|
||||||
|
* src/spicelib/parser/inp2r.c ,
|
||||||
|
* src/xspice/icm/analog/file_source/cfunc.mod :
|
||||||
|
swallow type conversion warnings
|
||||||
|
|
||||||
2011-06-24 Robert Larice
|
2011-06-24 Robert Larice
|
||||||
* src/ciderlib/oned/oneprint.c ,
|
* src/ciderlib/oned/oneprint.c ,
|
||||||
* src/ciderlib/twod/twoprint.c :
|
* src/ciderlib/twod/twoprint.c :
|
||||||
|
|
@ -12,11 +23,13 @@
|
||||||
tiny rewrite, round to nearest integer and reset errno for strtol()
|
tiny rewrite, round to nearest integer and reset errno for strtol()
|
||||||
|
|
||||||
2011-06-23 Holger Vogt
|
2011-06-23 Holger Vogt
|
||||||
* /xspice/icm/analog/modpath.lst,
|
* src/xspice/icm/analog/modpath.lst ,
|
||||||
/xspice/icm/analog/file_source/cfunc.mod,
|
* src/xspice/icm/analog/file_source/cfunc.mod ,
|
||||||
/xspice/icm/analog/file_source/ifspec.ifs:
|
* src/xspice/icm/analog/file_source/ifspec.ifs :
|
||||||
code model with input from file added (T. Sailer)
|
code model with input from file added (T. Sailer)
|
||||||
example/xspice/fstest.sp, sine.m: test of 'filesource'
|
* examples/xspice/fstest.sp ,
|
||||||
|
* examples/xspice/sine.m :
|
||||||
|
test of 'filesource'
|
||||||
* inpcom.c: bug no. 3317928, patched by Robert
|
* inpcom.c: bug no. 3317928, patched by Robert
|
||||||
|
|
||||||
2011-06-23 Robert Larice
|
2011-06-23 Robert Larice
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ com_ahelp(wordlist *wl)
|
||||||
int i, n;
|
int i, n;
|
||||||
/* assert: number of commands must be less than 512 */
|
/* assert: number of commands must be less than 512 */
|
||||||
struct comm *cc[512];
|
struct comm *cc[512];
|
||||||
int env = 0;
|
unsigned int env = 0;
|
||||||
struct comm *com;
|
struct comm *com;
|
||||||
int level;
|
unsigned int level;
|
||||||
char slevel[256];
|
char slevel[256];
|
||||||
|
|
||||||
if (wl) {
|
if (wl) {
|
||||||
|
|
|
||||||
|
|
@ -2589,8 +2589,8 @@ inp_do_macro_param_replace( int fcn_number, char *params[] )
|
||||||
*param_ptr = '\0';
|
*param_ptr = '\0';
|
||||||
|
|
||||||
{
|
{
|
||||||
int curr_str_len = curr_str ? strlen(curr_str) : 0;
|
size_t curr_str_len = curr_str ? strlen(curr_str) : 0;
|
||||||
int len = strlen(curr_ptr) + strlen(params[i]) + 1;
|
size_t len = strlen(curr_ptr) + strlen(params[i]) + 1;
|
||||||
if ( str_has_arith_char( params[i] ) ) {
|
if ( str_has_arith_char( params[i] ) ) {
|
||||||
curr_str = TREALLOC(char, curr_str, curr_str_len + len + 2);
|
curr_str = TREALLOC(char, curr_str, curr_str_len + len + 2);
|
||||||
sprintf( curr_str + curr_str_len, "%s(%s)", curr_ptr, params[i] );
|
sprintf( curr_str + curr_str_len, "%s(%s)", curr_ptr, params[i] );
|
||||||
|
|
@ -2708,8 +2708,8 @@ if ( *str_ptr == ')' ) *str_ptr = ' ';
|
||||||
keep = *fcn_name;
|
keep = *fcn_name;
|
||||||
*fcn_name = '\0';
|
*fcn_name = '\0';
|
||||||
{
|
{
|
||||||
int curr_str_len = curr_str ? strlen(curr_str) : 0;
|
size_t curr_str_len = curr_str ? strlen(curr_str) : 0;
|
||||||
int len = strlen(str) + strlen(macro_str) + 3;
|
size_t len = strlen(str) + strlen(macro_str) + 3;
|
||||||
curr_str = TREALLOC(char, curr_str, curr_str_len + len);
|
curr_str = TREALLOC(char, curr_str, curr_str_len + len);
|
||||||
sprintf( curr_str + curr_str_len, "%s(%s)", str, macro_str );
|
sprintf( curr_str + curr_str_len, "%s(%s)", str, macro_str );
|
||||||
}
|
}
|
||||||
|
|
@ -2723,8 +2723,8 @@ if ( *str_ptr == ')' ) *str_ptr = ' ';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( str != NULL ) {
|
if ( str != NULL ) {
|
||||||
int curr_str_len = strlen(curr_str);
|
size_t curr_str_len = strlen(curr_str);
|
||||||
int len = strlen(str) + 1;
|
size_t len = strlen(str) + 1;
|
||||||
curr_str = TREALLOC(char, curr_str, curr_str_len + len);
|
curr_str = TREALLOC(char, curr_str, curr_str_len + len);
|
||||||
sprintf( curr_str + curr_str_len, "%s", str );
|
sprintf( curr_str + curr_str_len, "%s", str );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ char
|
||||||
upcase (char c)
|
upcase (char c)
|
||||||
{
|
{
|
||||||
if ((c >= 'a') && (c <= 'z'))
|
if ((c >= 'a') && (c <= 'z'))
|
||||||
return c + 'A' - 'a';
|
return (char) (c + 'A' - 'a');
|
||||||
else
|
else
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
@ -364,7 +364,7 @@ nadd ( SPICE_DSTRINGPTR dstr_p, long n)
|
||||||
}
|
}
|
||||||
for (j = k - 1; j >= 0; j--)
|
for (j = k - 1; j >= 0; j--)
|
||||||
{
|
{
|
||||||
load_str[0] = d[j] + '0';
|
load_str[0] = (char) ('0' + d[j]);
|
||||||
spice_dstring_append( dstr_p, load_str, 1 ) ;
|
spice_dstring_append( dstr_p, load_str, 1 ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -392,7 +392,7 @@ naddll (SPICE_DSTRINGPTR dstr_p, long long n)
|
||||||
|
|
||||||
while (n > 0)
|
while (n > 0)
|
||||||
{
|
{
|
||||||
d[k] = n % 10;
|
d[k] = (int) (n % 10);
|
||||||
k++;
|
k++;
|
||||||
n = n / 10;
|
n = n / 10;
|
||||||
}
|
}
|
||||||
|
|
@ -409,7 +409,7 @@ naddll (SPICE_DSTRINGPTR dstr_p, long long n)
|
||||||
}
|
}
|
||||||
for (j = k - 1; j >= 0; j--)
|
for (j = k - 1; j >= 0; j--)
|
||||||
{
|
{
|
||||||
load_str[0] = d[j] + '0';
|
load_str[0] = (char) ('0' + d[j]);
|
||||||
spice_dstring_append( dstr_p, load_str, 1 ) ;
|
spice_dstring_append( dstr_p, load_str, 1 ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1601,7 +1601,7 @@ insertnumber (tdico * dico, int i, char *s, SPICE_DSTRINGPTR ustr_p)
|
||||||
s+i, u, id );
|
s+i, u, id );
|
||||||
|
|
||||||
/* swallow everything on failure */
|
/* swallow everything on failure */
|
||||||
return i + strlen(s+i);
|
return i + (int) strlen(s+i);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ void initw(void)
|
||||||
unsigned long int coa, cob, s;
|
unsigned long int coa, cob, s;
|
||||||
|
|
||||||
/* initialize the uniform generator */
|
/* initialize the uniform generator */
|
||||||
srand(getpid());
|
srand((unsigned int) getpid());
|
||||||
// srand(17);
|
// srand(17);
|
||||||
TausSeed();
|
TausSeed();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -847,7 +847,7 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
cp_program = ft_sim->simulator;
|
cp_program = ft_sim->simulator;
|
||||||
|
|
||||||
srand(getpid());
|
srand((unsigned int) getpid());
|
||||||
TausSeed();
|
TausSeed();
|
||||||
|
|
||||||
/* --- Process command line options --- */
|
/* --- Process command line options --- */
|
||||||
|
|
@ -1115,7 +1115,7 @@ bot:
|
||||||
initnorm (0, 0);
|
initnorm (0, 0);
|
||||||
if (!cp_getvar("rndseed", CP_NUM, &rseed)) {
|
if (!cp_getvar("rndseed", CP_NUM, &rseed)) {
|
||||||
time_t acttime = time(NULL);
|
time_t acttime = time(NULL);
|
||||||
rseed = (int) acttime;
|
rseed = (unsigned int) acttime;
|
||||||
}
|
}
|
||||||
initnorm (rseed, 2);
|
initnorm (rseed, 2);
|
||||||
fprintf (cp_out, "SoS %f, seed value: %ld\n", renormalize(), rseed);
|
fprintf (cp_out, "SoS %f, seed value: %ld\n", renormalize(), rseed);
|
||||||
|
|
@ -1125,7 +1125,7 @@ bot:
|
||||||
unsigned int rseed = 66;
|
unsigned int rseed = 66;
|
||||||
if (!cp_getvar("rndseed", CP_NUM, &rseed)) {
|
if (!cp_getvar("rndseed", CP_NUM, &rseed)) {
|
||||||
time_t acttime = time(NULL);
|
time_t acttime = time(NULL);
|
||||||
rseed = (int) acttime;
|
rseed = (unsigned int) acttime;
|
||||||
}
|
}
|
||||||
srand(rseed);
|
srand(rseed);
|
||||||
initw();
|
initw();
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||||
for(s = line; NULL != (s = strstr(s, "tc")); ) {
|
for(s = line; NULL != (s = strstr(s, "tc")); ) {
|
||||||
|
|
||||||
char *p;
|
char *p;
|
||||||
int left_length;
|
size_t left_length;
|
||||||
|
|
||||||
s += 2;
|
s += 2;
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||||
while(*s && !isspace(*s))
|
while(*s && !isspace(*s))
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
left_length = s - current->line;
|
left_length = (size_t) (s - current->line);
|
||||||
|
|
||||||
/* skip any additional white space */
|
/* skip any additional white space */
|
||||||
while(isspace(*s))
|
while(isspace(*s))
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ void cm_filesource(ARGS) /* structure holding parms, inputs, outputs, etc.
|
||||||
if (INIT == 1) {
|
if (INIT == 1) {
|
||||||
/* Allocate storage for internal state */
|
/* Allocate storage for internal state */
|
||||||
cm_analog_alloc(0, 2 * sizeof(double));
|
cm_analog_alloc(0, 2 * sizeof(double));
|
||||||
cm_analog_alloc(1, 2 * size * sizeof(double));
|
cm_analog_alloc(1, size * (int) (2 * sizeof(double)));
|
||||||
cm_analog_alloc(2, sizeof(struct filesource_state));
|
cm_analog_alloc(2, sizeof(struct filesource_state));
|
||||||
}
|
}
|
||||||
timeinterval = (double *)cm_analog_get_ptr(0, 0);
|
timeinterval = (double *)cm_analog_get_ptr(0, 0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue