# HG changeset patch # User Jim Meyering # Date 1322642100 -3600 # Node ID d9f87d8f22282892497754ea6ee95f7c0c1425dc # Parent fd0796dd37e206f700cff47c4d5ec38d7bfeeecd hash: mark a few floating point constants with "f" suffix * lib/hash.c (DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR) (DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR): Mark literal floating point constants with "f", since they're destined to be saved/used as "float"s. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-11-30 Jim Meyering + + hash: mark a few floating point constants with "f" suffix + * lib/hash.c (DEFAULT_GROWTH_THRESHOLD, DEFAULT_GROWTH_FACTOR) + (DEFAULT_SHRINK_THRESHOLD, DEFAULT_SHRINK_FACTOR): Mark literal + floating point constants with "f", since they're destined to be + saved/used as "float"s. + 2011-11-29 Paolo Bonzini float tests: Correct and re-enable assertion about LDBL_MIN_EXP. diff --git a/lib/hash.c b/lib/hash.c --- a/lib/hash.c +++ b/lib/hash.c @@ -113,8 +113,8 @@ 1.0). The growth threshold defaults to 0.8, and the growth factor defaults to 1.414, meaning that the table will have doubled its size every second time 80% of the buckets get used. */ -#define DEFAULT_GROWTH_THRESHOLD 0.8 -#define DEFAULT_GROWTH_FACTOR 1.414 +#define DEFAULT_GROWTH_THRESHOLD 0.8f +#define DEFAULT_GROWTH_FACTOR 1.414f /* If a deletion empties a bucket and causes the ratio of used buckets to table size to become smaller than the shrink threshold (a number between @@ -122,8 +122,8 @@ number greater than the shrink threshold but smaller than 1.0). The shrink threshold and factor default to 0.0 and 1.0, meaning that the table never shrinks. */ -#define DEFAULT_SHRINK_THRESHOLD 0.0 -#define DEFAULT_SHRINK_FACTOR 1.0 +#define DEFAULT_SHRINK_THRESHOLD 0.0f +#define DEFAULT_SHRINK_FACTOR 1.0f /* Use this to initialize or reset a TUNING structure to some sensible values. */