Remove trailing whitespace

Additionally, added a GitHub Action to ensure no more trailing
whitespace will creep in again in the future.

I'm excluding Markdown files from this check, since trailing whitespace
is significant there, and also excluding `build-aux/install-sh` because
there is significant trailing whitespace on the line that sets
`defaultIFS`.
This commit is contained in:
Kevin Svetlitski
2023-04-28 12:29:49 -07:00
committed by Qi Wang
parent 05385191d4
commit f2e00d2fd3
12 changed files with 70 additions and 53 deletions

View File

@@ -45,7 +45,7 @@
/*-----------------
BASIC DEFINITIONS
-----------------*/
/** Mersenne Exponent. The period of the sequence
/** Mersenne Exponent. The period of the sequence
* is a multiple of 2^MEXP-1.
* #define MEXP 19937 */
/** SFMT generator has an internal state array of 128-bit integers,
@@ -63,25 +63,25 @@
following definitions are in paramsXXXX.h file.
----------------------*/
/** the pick up position of the array.
#define POS1 122
#define POS1 122
*/
/** the parameter of shift left as four 32-bit registers.
#define SL1 18
*/
/** the parameter of shift left as one 128-bit register.
* The 128-bit integer is shifted by (SL2 * 8) bits.
#define SL2 1
/** the parameter of shift left as one 128-bit register.
* The 128-bit integer is shifted by (SL2 * 8) bits.
#define SL2 1
*/
/** the parameter of shift right as four 32-bit registers.
#define SR1 11
*/
/** the parameter of shift right as one 128-bit register.
* The 128-bit integer is shifted by (SL2 * 8) bits.
#define SR2 1
/** the parameter of shift right as one 128-bit register.
* The 128-bit integer is shifted by (SL2 * 8) bits.
#define SR2 1
*/
/** A bitmask, used in the recursion. These parameters are introduced
@@ -89,7 +89,7 @@
#define MSK1 0xdfffffefU
#define MSK2 0xddfecb7fU
#define MSK3 0xbffaffffU
#define MSK4 0xbffffff6U
#define MSK4 0xbffffff6U
*/
/** These definitions are part of a 128-bit period certification vector.

View File

@@ -33,8 +33,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file SFMT.h
/**
* @file SFMT.h
*
* @brief SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom
* number generator
@@ -53,7 +53,7 @@
* and you have to define PRIu64 and PRIx64 in this file as follows:
* @verbatim
typedef unsigned int uint32_t
typedef unsigned long long uint64_t
typedef unsigned long long uint64_t
#define PRIu64 "llu"
#define PRIx64 "llx"
@endverbatim
@@ -84,8 +84,8 @@ int get_min_array_size64(void);
/* These real versions are due to Isaku Wada */
/** generates a random number on [0,1]-real-interval */
static inline double to_real1(uint32_t v) {
return v * (1.0/4294967295.0);
/* divided by 2^32-1 */
return v * (1.0/4294967295.0);
/* divided by 2^32-1 */
}
/** generates a random number on [0,1]-real-interval */
@@ -95,7 +95,7 @@ static inline double genrand_real1(sfmt_t *ctx) {
/** generates a random number on [0,1)-real-interval */
static inline double to_real2(uint32_t v) {
return v * (1.0/4294967296.0);
return v * (1.0/4294967296.0);
/* divided by 2^32 */
}
@@ -106,7 +106,7 @@ static inline double genrand_real2(sfmt_t *ctx) {
/** generates a random number on (0,1)-real-interval */
static inline double to_real3(uint32_t v) {
return (((double)v) + 0.5)*(1.0/4294967296.0);
return (((double)v) + 0.5)*(1.0/4294967296.0);
/* divided by 2^32 */
}

View File

@@ -26,7 +26,7 @@ do_arena_create(ssize_t dirty_decay_ms, ssize_t muzzy_decay_ms) {
static inline void
do_arena_destroy(unsigned arena_ind) {
/*
/*
* For convenience, flush tcache in case there are cached items.
* However not assert success since the tcache may be disabled.
*/

View File

@@ -28,12 +28,12 @@ timer_ratio(timedelta_t *a, timedelta_t *b, char *buf, size_t buflen) {
size_t i = 0;
size_t j, n;
/*
* The time difference could be 0 if the two clock readings are
/*
* The time difference could be 0 if the two clock readings are
* identical, either due to the operations being measured in the middle
* took very little time (or even got optimized away), or the clock
* took very little time (or even got optimized away), or the clock
* readings are bad / very coarse grained clock.
* Thus, bump t1 if it is 0 to avoid dividing 0.
* Thus, bump t1 if it is 0 to avoid dividing 0.
*/
if (t1 == 0) {
t1 = 1;

View File

@@ -52,15 +52,15 @@ malloc_sdallocx(void) {
#endif
TEST_BEGIN(test_free_vs_delete) {
compare_funcs(10*1000*1000, 100*1000*1000,
"malloc_free", (void *)malloc_free,
compare_funcs(10*1000*1000, 100*1000*1000,
"malloc_free", (void *)malloc_free,
"new_delete", (void *)new_delete);
}
TEST_END
TEST_BEGIN(test_free_array_vs_delete_array) {
compare_funcs(10*1000*1000, 100*1000*1000,
"malloc_free_array", (void *)malloc_free_array,
compare_funcs(10*1000*1000, 100*1000*1000,
"malloc_free_array", (void *)malloc_free_array,
"delete_array", (void *)new_delete_array);
}
TEST_END
@@ -68,8 +68,8 @@ TEST_END
TEST_BEGIN(test_sized_delete_vs_sdallocx) {
#if __cpp_sized_deallocation >= 201309
compare_funcs(10*1000*1000, 100*1000*1000,
"new_size_delete", (void *)new_sized_delete,
compare_funcs(10*1000*1000, 100*1000*1000,
"new_size_delete", (void *)new_sized_delete,
"malloc_sdallocx", (void *)malloc_sdallocx);
#else
malloc_printf("Skipping test_sized_delete_vs_sdallocx since \