mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-25 18:40:19 -04:00
Limit maximum consecutive newlines in uncrustify configuration
This commit is contained in:
parent
918a6a192b
commit
78abc2c7b7
17 changed files with 3 additions and 26 deletions
|
|
@ -1038,7 +1038,6 @@ void extra_free(void* void_extra)
|
||||||
free(extra);
|
free(extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void fs_lock(struct snapraid_disk* disk)
|
static inline void fs_lock(struct snapraid_disk* disk)
|
||||||
{
|
{
|
||||||
#if HAVE_THREAD
|
#if HAVE_THREAD
|
||||||
|
|
|
||||||
|
|
@ -89,3 +89,4 @@ int handle_utime(struct snapraid_handle* handle);
|
||||||
struct snapraid_handle* handle_mapping(struct snapraid_state* state, unsigned* diskmax);
|
struct snapraid_handle* handle_mapping(struct snapraid_state* state, unsigned* diskmax);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,5 @@ int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigne
|
||||||
*/
|
*/
|
||||||
int state_barrier(struct snapraid_state* state, struct snapraid_io* io, struct snapraid_parity_handle* parity_handle, block_off_t blockcur);
|
int state_barrier(struct snapraid_state* state, struct snapraid_io* io, struct snapraid_parity_handle* parity_handle, block_off_t blockcur);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -570,7 +570,6 @@ static int discovery_inode_compare_to_arg(const void* void_arg, const void* void
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert the file in the inode set.
|
* Insert the file in the inode set.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,6 @@ static struct hash_test_vector TEST_SPOOKY2[] = {
|
||||||
{ 0, 0, { 0 }, { 0 } }
|
{ 0, 0, { 0 }, { 0 } }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test vectors for MuseAirLoong
|
* Test vectors for MuseAirLoong
|
||||||
*/
|
*/
|
||||||
|
|
@ -203,7 +202,6 @@ static void test_hash(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; TEST_MURMUR3[i].data; ++i) {
|
for (i = 0; TEST_MURMUR3[i].data; ++i) {
|
||||||
unsigned char digest[HASH_MAX];
|
unsigned char digest[HASH_MAX];
|
||||||
memcpy(buffer_aligned, TEST_MURMUR3[i].data, TEST_MURMUR3[i].len);
|
memcpy(buffer_aligned, TEST_MURMUR3[i].data, TEST_MURMUR3[i].len);
|
||||||
|
|
@ -230,7 +228,6 @@ static void test_hash(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; TEST_MUSEAIR[i].data; ++i) {
|
for (i = 0; TEST_MUSEAIR[i].data; ++i) {
|
||||||
unsigned char digest[HASH_MAX];
|
unsigned char digest[HASH_MAX];
|
||||||
memcpy(buffer_aligned, TEST_MUSEAIR[i].data, TEST_MUSEAIR[i].len);
|
memcpy(buffer_aligned, TEST_MUSEAIR[i].data, TEST_MUSEAIR[i].len);
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,6 @@ void log_close(const char* file)
|
||||||
#define OPT_TEST_KILL_BEFORE_SYNC 310
|
#define OPT_TEST_KILL_BEFORE_SYNC 310
|
||||||
#define OPT_TEST_KILL_AFTER_RESIZE 311
|
#define OPT_TEST_KILL_AFTER_RESIZE 311
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_GETOPT_LONG
|
#if HAVE_GETOPT_LONG
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{ "conf", 1, 0, 'c' },
|
{ "conf", 1, 0, 'c' },
|
||||||
|
|
@ -298,7 +297,6 @@ static struct option long_options[] = {
|
||||||
{ "help", 0, 0, 'H' },
|
{ "help", 0, 0, 'H' },
|
||||||
{ "version", 0, 0, 'V' },
|
{ "version", 0, 0, 'V' },
|
||||||
|
|
||||||
|
|
||||||
{ "no-warnings", 0, 0, OPT_NO_WARNINGS }, /* disable annoying warnings */
|
{ "no-warnings", 0, 0, OPT_NO_WARNINGS }, /* disable annoying warnings */
|
||||||
{ "gui", 0, 0, OPT_GUI }, /* undocumented GUI interface option (it was also 'G' in the past) */
|
{ "gui", 0, 0, OPT_GUI }, /* undocumented GUI interface option (it was also 'G' in the past) */
|
||||||
{ "gui-verbose", 0, 0, OPT_GUI_VERBOSE }, /* undocumented GUI interface option */
|
{ "gui-verbose", 0, 0, OPT_GUI_VERBOSE }, /* undocumented GUI interface option */
|
||||||
|
|
|
||||||
|
|
@ -343,8 +343,6 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!state->opt.skip_parity_access) {
|
if (!state->opt.skip_parity_access) {
|
||||||
for (l = 0; l < state->level; ++l) {
|
for (l = 0; l < state->level; ++l) {
|
||||||
for (s = 0; s < state->parity[l].split_mac; ++s) {
|
for (s = 0; s < state->parity[l].split_mac; ++s) {
|
||||||
|
|
@ -2021,7 +2019,6 @@ void state_refresh(struct snapraid_state* state)
|
||||||
log_tag("fsinfo_extra:%s:%" PRIu64 ":%" PRIu64 "\n", esc_tag(extra->name), total_space, free_space);
|
log_tag("fsinfo_extra:%s:%" PRIu64 ":%" PRIu64 "\n", esc_tag(extra->name), total_space, free_space);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note what we don't set need_write = 1, because we don't want
|
* Note what we don't set need_write = 1, because we don't want
|
||||||
* to update the content file only for the free space info.
|
* to update the content file only for the free space info.
|
||||||
|
|
@ -6477,7 +6474,6 @@ void generate_configuration(const char* path)
|
||||||
state_done(&state);
|
state_done(&state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establish a durable I/O barrier: drain asynchronous writes, collect their
|
* Establish a durable I/O barrier: drain asynchronous writes, collect their
|
||||||
* errors, sync parity only if all writes succeeded, then quiesce read-ahead.
|
* errors, sync parity only if all writes succeeded, then quiesce read-ahead.
|
||||||
|
|
|
||||||
|
|
@ -1298,7 +1298,6 @@ static int devresolve(uint64_t device, char* path, size_t path_size)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* uuid */
|
/* uuid */
|
||||||
|
|
||||||
|
|
@ -1585,7 +1584,6 @@ static int devlabel_ioctl(const char* path, char* label, size_t label_size)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
static int devuuid_darwin(const char* path, char* uuid, size_t uuid_size)
|
static int devuuid_darwin(const char* path, char* uuid, size_t uuid_size)
|
||||||
{
|
{
|
||||||
|
|
@ -1825,7 +1823,6 @@ int devuuid(uint64_t device_id, const char* device_path, char* uuid, size_t uuid
|
||||||
log_tag("uuid:by-uuid:%u:%u: by-uuid not supported\n", major(device_id), minor(device_id));
|
log_tag("uuid:by-uuid:%u:%u: by-uuid not supported\n", major(device_id), minor(device_id));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
log_tag("uuid:notfound:%u:%u:\n", major(device_id), minor(device_id));
|
log_tag("uuid:notfound:%u:%u:\n", major(device_id), minor(device_id));
|
||||||
|
|
||||||
/* not supported */
|
/* not supported */
|
||||||
|
|
@ -3009,7 +3006,6 @@ void fssnapshot_unmount(const struct fssnapshot_struct* fss)
|
||||||
(void)fss;
|
(void)fss;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* dev */
|
/* dev */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2333,7 +2333,7 @@ donot_add_nl_before_cpp_comment = false # true/false
|
||||||
#
|
#
|
||||||
|
|
||||||
# The maximum number of consecutive newlines (3 = 2 blank lines).
|
# The maximum number of consecutive newlines (3 = 2 blank lines).
|
||||||
nl_max = 0 # unsigned number
|
nl_max = 2 # unsigned number
|
||||||
|
|
||||||
# The maximum number of consecutive newlines in a function.
|
# The maximum number of consecutive newlines in a function.
|
||||||
nl_max_blank_in_func = 0 # unsigned number
|
nl_max_blank_in_func = 0 # unsigned number
|
||||||
|
|
|
||||||
|
|
@ -952,7 +952,6 @@ static __always_inline void raid_genX_avx2ext(int nd, size_t size, void **vv, in
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recover one data failure using selected parity with AVX2.
|
* Recover one data failure using selected parity with AVX2.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1443,7 +1443,6 @@ static __always_inline void raid_genX_avx512gfni_aes(int nd, size_t size, void *
|
||||||
raid_avx_end(streaming);
|
raid_avx_end(streaming);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recover multiple data failures using selected parity blocks with AVX2 GFNI.
|
* Recover multiple data failures using selected parity blocks with AVX2 GFNI.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ static __always_inline void raid_gen1_neon_gen(int nd, size_t size, void **vv)
|
||||||
|
|
||||||
raid_neon_begin();
|
raid_neon_begin();
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < size; i += 64) {
|
for (i = 0; i < size; i += 64) {
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"ldr q0, %0\n"
|
"ldr q0, %0\n"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ static __always_inline void raid_gen1_neon32_gen(int nd, size_t size, void **vv)
|
||||||
|
|
||||||
raid_neon32_begin();
|
raid_neon32_begin();
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < size; i += 64) {
|
for (i = 0; i < size; i += 64) {
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"vld1.8 {q0}, %0\n"
|
"vld1.8 {q0}, %0\n"
|
||||||
|
|
|
||||||
|
|
@ -215,8 +215,6 @@
|
||||||
* [5] Plank, "Screaming Fast Galois Field Arithmetic Using Intel SIMD Instructions", 2013
|
* [5] Plank, "Screaming Fast Galois Field Arithmetic Using Intel SIMD Instructions", 2013
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inverts the square matrix M of size nxn into V.
|
* Inverts the square matrix M of size nxn into V.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1229,7 +1229,6 @@ static __always_inline void raid_genX_ssse3ext(int nd, size_t size, void **vv, i
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recover failure of one data block using selected parity with SSSE3, optimized for one failure.
|
* Recover failure of one data block using selected parity with SSSE3, optimized for one failure.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -33296,4 +33296,3 @@ const uint8_t __aligned(256) raid_gfmulpshufb_aes[256][2][16] =
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2333,7 +2333,7 @@ donot_add_nl_before_cpp_comment = false # true/false
|
||||||
#
|
#
|
||||||
|
|
||||||
# The maximum number of consecutive newlines (3 = 2 blank lines).
|
# The maximum number of consecutive newlines (3 = 2 blank lines).
|
||||||
nl_max = 0 # unsigned number
|
nl_max = 2 # unsigned number
|
||||||
|
|
||||||
# The maximum number of consecutive newlines in a function.
|
# The maximum number of consecutive newlines in a function.
|
||||||
nl_max_blank_in_func = 0 # unsigned number
|
nl_max_blank_in_func = 0 # unsigned number
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue