swallow type conversion warnings
This commit is contained in:
parent
caf158f0f3
commit
90360ef24c
|
|
@ -1,5 +1,13 @@
|
|||
2011-06-26 Robert Larice
|
||||
* src/include/hash.h ,
|
||||
* src/misc/dstring.c ,
|
||||
* src/misc/hash.c :
|
||||
swallow type conversion warnings
|
||||
FIXME, get rid of this homegrown printf implementation (dstring.c)
|
||||
|
||||
2011-06-26 Dietmar Warning
|
||||
* devices/bsim4/b4temp.c: zero init with TMALLOC instead of malloc
|
||||
a missing pParam->BSIM4tvoffcv = 0; is the actual culprit.
|
||||
* devices/bsim4/b4noi.c: correct init the correlated noise slot in noiseDens and
|
||||
lnNdens vector, bug should be reported to bsim4 developer team.
|
||||
|
||||
|
|
|
|||
|
|
@ -150,9 +150,9 @@ we want to intentionally assign it. The compiler is warning unnecessarily.
|
|||
if( c == 0) { \
|
||||
break ; \
|
||||
} \
|
||||
hsum += (hsum<<3) + c; \
|
||||
hsum += (hsum<<3) + (unsigned int) c; \
|
||||
} \
|
||||
hsum %= (size) ; \
|
||||
hsum %= (unsigned int) (size) ; \
|
||||
} while(0);
|
||||
|
||||
#define NGHASH_NUM_TO_HASH( num, hsum, size ) \
|
||||
|
|
@ -181,8 +181,8 @@ we want to intentionally assign it. The compiler is warning unnecessarily.
|
|||
do { \
|
||||
unsigned int temp ; \
|
||||
long value = (long) ptr ; \
|
||||
temp = value ; \
|
||||
hsum = temp & (size - 1) ; \
|
||||
temp = (unsigned int) value ; \
|
||||
hsum = temp & (unsigned int) (size - 1) ; \
|
||||
} while(0);
|
||||
|
||||
|
||||
|
|
@ -226,8 +226,8 @@ we want to intentionally assign it. The compiler is warning unnecessarily.
|
|||
do { \
|
||||
unsigned int temp ; \
|
||||
long value = (long) ptr ; \
|
||||
temp = value >> 4 ; \
|
||||
hsum = temp & (size - 1) ; \
|
||||
temp = (unsigned int) (value >> 4) ; \
|
||||
hsum = temp & (unsigned int) (size - 1) ; \
|
||||
} while(0);
|
||||
|
||||
#define NGHASH_PTR_COMPARE_FUNC( p1 , p2 ) ( (p1) != (p2) )
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ DESCRIPTION:This file contains the routines for manipulating dynamic strings.
|
|||
CONTENTS:
|
||||
DATE: Wed Mar 24 18:38:28 CDT 2010
|
||||
REVISIONS: $Log$
|
||||
REVISIONS: Revision 1.7 2011-06-22 17:17:41 rlar
|
||||
REVISIONS: Revision 1.8 2011-06-26 20:00:03 rlar
|
||||
REVISIONS: swallow type conversion warnings
|
||||
REVISIONS:
|
||||
REVISIONS: Revision 1.7 2011/06/22 17:17:41 rlar
|
||||
REVISIONS: remove some useless casts
|
||||
REVISIONS:
|
||||
REVISIONS: Revision 1.6 2010/11/06 20:17:20 rlar
|
||||
|
|
@ -146,7 +149,7 @@ static int spice_format_length( va_list args, char *fmt )
|
|||
int size_format ; /* width of field */
|
||||
int found_special ; /* look for special characters */
|
||||
char *s ; /* string */
|
||||
char c ; /* character */
|
||||
double d ;
|
||||
|
||||
/* -----------------------------------------------------------------
|
||||
* First find length of buffer.
|
||||
|
|
@ -190,7 +193,7 @@ static int spice_format_length( va_list args, char *fmt )
|
|||
found_special = TRUE ;
|
||||
break ;
|
||||
case 'c':
|
||||
c = va_arg(args, int) ;
|
||||
i = va_arg(args, int) ;
|
||||
len++ ;
|
||||
found_special = TRUE ;
|
||||
break ;
|
||||
|
|
@ -199,7 +202,7 @@ static int spice_format_length( va_list args, char *fmt )
|
|||
case 'F':
|
||||
case 'g':
|
||||
case 'G':
|
||||
c = va_arg(args, double) ;
|
||||
d = va_arg(args, double) ;
|
||||
len += 35 ;
|
||||
found_special = TRUE ;
|
||||
break ;
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ NGHASHPTR nghash_init_with_parms(void *comp_func, nghash_func hash_func, int num
|
|||
hashtable->max_density = max ;
|
||||
hashtable->need_resize = hashtable->size * hashtable->max_density ;
|
||||
hashtable->growth_factor = growth ;
|
||||
hashtable->unique = unique ;
|
||||
hashtable->power_of_two = power_of_two ;
|
||||
hashtable->unique = (unique ? 1 : 0);
|
||||
hashtable->power_of_two = (power_of_two ? 1 : 0);
|
||||
hashtable->thread = NULL ; /* initialize list */
|
||||
hashtable->last_entry = NULL ; /* end of list */
|
||||
hashtable->num_entries = 0 ;
|
||||
|
|
|
|||
Loading…
Reference in New Issue