Auto fixed clang-tidy readability-uppercase-literal-suffix warnings

This commit is contained in:
Sean McBride 2023-12-16 19:41:08 -05:00
parent 4188db2817
commit fb5c6b139c
12 changed files with 41 additions and 41 deletions

View File

@ -45,7 +45,7 @@ main()
/* Create a bunch of phoney data so we have something to write in
the example file. */
for (fp=(float *)temp, i=0; i<LAT_LEN*LON_LEN; i++)
*fp++ = 10.f + (float)i/10.f;
*fp++ = 10.F + (float)i/10.F;
/* Now create the file in both formats with the same code. */
for (i=0; i<2; i++)

View File

@ -87,9 +87,9 @@ main()
* would have some real data to write, for example, model
* output. */
for (lat = 0; lat < NLAT; lat++)
lats[lat] = START_LAT + 5.f*(float)lat;
lats[lat] = START_LAT + 5.F*(float)lat;
for (lon = 0; lon < NLON; lon++)
lons[lon] = START_LON + 5.f*(float)lon;
lons[lon] = START_LON + 5.F*(float)lon;
for (lvl = 0; lvl < NLVL; lvl++)
for (lat = 0; lat < NLAT; lat++)

View File

@ -78,9 +78,9 @@ main()
* would have some real data to write, for example, model
* output. */
for (lat = 0; lat < NLAT; lat++)
lats[lat] = START_LAT + 5.f*(float)lat;
lats[lat] = START_LAT + 5.F*(float)lat;
for (lon = 0; lon < NLON; lon++)
lons[lon] = START_LON + 5.f*(float)lon;
lons[lon] = START_LON + 5.F*(float)lon;
for (lat = 0; lat < NLAT; lat++)
for (lon = 0; lon < NLON; lon++)

View File

@ -585,7 +585,7 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type,
bit_xpl_nbr_zro = BIT_XPL_NBR_SGN_FLT - prc_bnr_xpl_rqr;
/* Create mask */
msk_f32_u32_zro = 0u; /* Zero all bits */
msk_f32_u32_zro = 0U; /* Zero all bits */
msk_f32_u32_zro = ~msk_f32_u32_zro; /* Turn all bits to ones */
/* BitShave mask for AND: Left shift zeros into bits to be
@ -605,7 +605,7 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type,
bit_xpl_nbr_zro = BIT_XPL_NBR_SGN_DBL - prc_bnr_xpl_rqr;
/* Create mask. */
msk_f64_u64_zro = 0ul; /* Zero all bits. */
msk_f64_u64_zro = 0UL; /* Zero all bits. */
msk_f64_u64_zro = ~msk_f64_u64_zro; /* Turn all bits to ones. */
/* BitShave mask for AND: Left shift zeros into bits to be
@ -1461,7 +1461,7 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type,
prc_bnr_xpl_rqr--; /* 20211003 Reduce formula result by 1 bit: Passes all tests, improves CR by ~10% */
bit_xpl_nbr_zro = BIT_XPL_NBR_SGN_FLT - prc_bnr_xpl_rqr;
msk_f32_u32_zro = 0u; /* Zero all bits */
msk_f32_u32_zro = 0U; /* Zero all bits */
msk_f32_u32_zro = ~msk_f32_u32_zro; /* Turn all bits to ones */
/* Bit Shave mask for AND: Left shift zeros into bits to be rounded, leave ones in untouched bits */
msk_f32_u32_zro <<= bit_xpl_nbr_zro;
@ -1495,7 +1495,7 @@ nc4_convert_type(const void *src, void *dest, const nc_type src_type,
prc_bnr_xpl_rqr--; /* 20211003 Reduce formula result by 1 bit: Passes all tests, improves CR by ~10% */
bit_xpl_nbr_zro = BIT_XPL_NBR_SGN_DBL - prc_bnr_xpl_rqr;
msk_f64_u64_zro = 0ull; /* Zero all bits */
msk_f64_u64_zro = 0ULL; /* Zero all bits */
msk_f64_u64_zro = ~msk_f64_u64_zro; /* Turn all bits to ones */
/* Bit Shave mask for AND: Left shift zeros into bits to be rounded, leave ones in untouched bits */
msk_f64_u64_zro <<= bit_xpl_nbr_zro;

View File

@ -126,7 +126,7 @@ printf("*** testing diskless file with scalar vars...");
int ndims_in, nvars_in, natts_in, unlimdimid_in;
char name_in[NC_MAX_NAME + 1];
nc_type type_in;
float float_data = 3.14f, float_data_in;
float float_data = 3.14F, float_data_in;
int int_data = 42, int_data_in;
short short_data = 2, short_data_in;
@ -176,7 +176,7 @@ printf("*** testing diskless file with scalar vars...");
if(!usenetcdf4 && persist) {
int ncid, varid0, varid1, varid2;
float float_data = 3.14f, float_data_in;
float float_data = 3.14F, float_data_in;
int int_data = 42, int_data_in;
short short_data = 2, short_data_in;
@ -221,7 +221,7 @@ printf("*** testing diskless file with scalar vars...");
size_t start[1] = {0};
size_t count[1] = {DIM1_LEN};
int i;
float float_data = 42.22f, float_data_in;
float float_data = 42.22F, float_data_in;
/* This is some really important data that I want to save. */
for (i = 0; i < DIM1_LEN; i++)
@ -301,7 +301,7 @@ printf("*** testing diskless file with scalar vars...");
int ndims_in, nvars_in, natts_in, unlimdimid_in;
char name_in[NC_MAX_NAME + 1];
nc_type type_in;
float float_data = 3.14f, float_data_in;
float float_data = 3.14F, float_data_in;
int int_data = 42, int_data_in;
short short_data = 2, short_data_in;

View File

@ -317,7 +317,7 @@ static float int162float32_data[DIMSIZE]={0.000,256.000,512.000,768.000,1024.000
static int int32_data[DIMSIZE]={0,2048,4096,6144,8192,10240,12288,14336,16384,18432,20480,22528,24576,26624,28672,30720,32768,34816,36864,38912,40960,43008,45056,47104,49152};
static float int32tofloat32_data[DIMSIZE]={0.000,2048.000,4096.000,6144.000,8192.000,10240.000,12288.000,14336.000,16384.000,18432.000,20480.000,22528.000,24576.000,26624.000,28672.000,30720.000,32768.000,34816.000,36864.000,38912.000,40960.000,43008.000,45056.000,47104.000,49152.000};
static long int32toilong_data[DIMSIZE]={0,2048,4096,6144,8192,10240,12288,14336,16384,18432,20480,22528,24576,26624,28672,30720,32768,34816,36864,38912,40960,43008,45056,47104,49152};
static float float32_data[DIMSIZE]={0.000f,0.010f,0.020f,0.030f,0.040f,0.050f,0.060f,0.070f,0.080f,0.090f,0.100f,0.110f,0.120f,0.130f,0.140f,0.149f,0.159f,0.169f,0.179f,0.189f,0.199f,0.208f,0.218f,0.228f,0.238f};
static float float32_data[DIMSIZE]={0.000F,0.010F,0.020F,0.030F,0.040F,0.050F,0.060F,0.070F,0.080F,0.090F,0.100F,0.110F,0.120F,0.130F,0.140F,0.149F,0.159F,0.169F,0.179F,0.189F,0.199F,0.208F,0.218F,0.228F,0.238F};
static double float64_data[DIMSIZE]={1.000,1.000,1.000,1.000,0.999,0.999,0.998,0.998,0.997,0.996,0.995,0.994,0.993,0.992,0.990,0.989,0.987,0.986,0.984,0.982,0.980,0.978,0.976,0.974,0.971};
#ifndef USE_NETCDF4

View File

@ -316,7 +316,7 @@ static float int162float32_data[DIMSIZE]={0.000,256.000,512.000,768.000,1024.000
static int int32_data[DIMSIZE]={0,2048,4096,6144,8192,10240,12288,14336,16384,18432,20480,22528,24576,26624,28672,30720,32768,34816,36864,38912,40960,43008,45056,47104,49152};
static float int32tofloat32_data[DIMSIZE]={0.000,2048.000,4096.000,6144.000,8192.000,10240.000,12288.000,14336.000,16384.000,18432.000,20480.000,22528.000,24576.000,26624.000,28672.000,30720.000,32768.000,34816.000,36864.000,38912.000,40960.000,43008.000,45056.000,47104.000,49152.000};
static long int32toilong_data[DIMSIZE]={0,2048,4096,6144,8192,10240,12288,14336,16384,18432,20480,22528,24576,26624,28672,30720,32768,34816,36864,38912,40960,43008,45056,47104,49152};
static float float32_data[DIMSIZE]={0.000f,0.010f,0.020f,0.030f,0.040f,0.050f,0.060f,0.070f,0.080f,0.090f,0.100f,0.110f,0.120f,0.130f,0.140f,0.149f,0.159f,0.169f,0.179f,0.189f,0.199f,0.208f,0.218f,0.228f,0.238f};
static float float32_data[DIMSIZE]={0.000F,0.010F,0.020F,0.030F,0.040F,0.050F,0.060F,0.070F,0.080F,0.090F,0.100F,0.110F,0.120F,0.130F,0.140F,0.149F,0.159F,0.169F,0.179F,0.189F,0.199F,0.208F,0.218F,0.228F,0.238F};
static double float64_data[DIMSIZE]={1.000,1.000,1.000,1.000,0.999,0.999,0.998,0.998,0.997,0.996,0.995,0.994,0.993,0.992,0.990,0.989,0.987,0.986,0.984,0.982,0.980,0.978,0.976,0.974,0.971};
#ifndef USE_NETCDF4

View File

@ -33,33 +33,33 @@ TODO: Note that this test uses thredds server
#define VAR "SST"
static float expected_stride1[12] = {
29.430857f,
29.403780f,
29.325428f,
29.578333f,
29.660833f,
29.378437f,
29.151943f,
29.109715f,
29.114864f,
29.550285f,
29.542500f,
29.500286f
29.430857F,
29.403780F,
29.325428F,
29.578333F,
29.660833F,
29.378437F,
29.151943F,
29.109715F,
29.114864F,
29.550285F,
29.542500F,
29.500286F
};
static float expected_stride2[6] = {
29.430857f,
29.325428f,
29.660833f,
29.151943f,
29.114864f,
29.542500f
29.430857F,
29.325428F,
29.660833F,
29.151943F,
29.114864F,
29.542500F
};
static float expected_stride3[3] = {
29.430857f,
29.378437f,
29.542500f
29.430857F,
29.378437F,
29.542500F
};
void

View File

@ -536,7 +536,7 @@ ncfloat_val_equals(const nctype_t *this,
const void *v1p, const void *v2p) {
float v1 = *(float* )v1p;
float v2 = *(float* )v2p;
if((v1 > 0.0f) != (v2 > 0.0f)) /* avoid overflow */
if((v1 > 0.0F) != (v2 > 0.0F)) /* avoid overflow */
return false;
if(isfinite(v1) && isfinite(v2))
return (absval(v1 - v2) <= absval(float_eps * v2)) ;

View File

@ -39,7 +39,7 @@
/* default bytes of memory we are willing to allocate for variable
* values during copy */
#define COPY_BUFFER_SIZE (5000000)
#define COPY_CHUNKCACHE_PREEMPTION (1.0f) /* for copying, can eject fully read chunks */
#define COPY_CHUNKCACHE_PREEMPTION (1.0F) /* for copying, can eject fully read chunks */
#define SAME_AS_INPUT (-1) /* default, if kind not specified */
#define CHUNK_THRESHOLD (8192) /* non-record variables with fewer bytes don't get chunked */
@ -484,7 +484,7 @@ inq_var_chunking_params(int igrp, int ivarid, int ogrp, int ovarid,
if(icontig == NC_CHUNKED && ocontig != NC_CHUNKED) { /* chunking only in input */
*chunkcache_nelemsp = 1; /* read one input chunk at a time */
*chunkcache_sizep = iprod;
*chunkcache_preemptionp = 1.0f;
*chunkcache_preemptionp = 1.0F;
return stat;
}

View File

@ -604,7 +604,7 @@ pr_att_valgs(
if(isnan(ff)) {
printf("NaNf%s", delim);
} else if(isinf(ff)) {
if(ff < 0.0f) {
if(ff < 0.0F) {
printf("-");
}
printf("Infinityf%s", delim);

View File

@ -54,7 +54,7 @@ H5PLget_plugin_info(void)
}
#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * (double)1.001f) + 12)
#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * (double)1.001F) + 12)
/*-------------------------------------------------------------------------