ERROR: Macros with multiple statements should be enclosed in a do - while loop #70: FILE: john_core/src/AFS_fmt.c:70: +#define AFS_swap(x, y) \ + (y) = (x); WARNING: macros should not use a trailing semicolon #70: FILE: john_core/src/AFS_fmt.c:70: +#define AFS_swap(x, y) \ + (y) = (x); ERROR: trailing statements should be on next line #129: FILE: john_core/src/AFS_fmt.c:129: + if (strncmp(ciphertext, "$K4$", 4)) return 0; ERROR: trailing statements should be on next line #131: FILE: john_core/src/AFS_fmt.c:131: + for (pos = &ciphertext[4]; atoi16[ARCH_INDEX(*pos)] != 0x7F; pos++); ERROR: trailing statements should be on next line #132: FILE: john_core/src/AFS_fmt.c:132: + if (*pos != ',' || pos - ciphertext != CIPHERTEXT_LENGTH) return 0; WARNING: suspect code indent for conditional statements (16, 16) #139: FILE: john_core/src/AFS_fmt.c:139: + if (value) + do { ERROR: trailing statements should be on next line #144: FILE: john_core/src/AFS_fmt.c:144: + if (!(count & 1)) return 0; ERROR: trailing statements should be on next line #230: FILE: john_core/src/AFS_fmt.c:230: + if (atoi64[value] == 0x7F) return ~(ARCH_WORD)0; ERROR: do not use assignment in if condition #242: FILE: john_core/src/AFS_fmt.c:242: + if ((binary = to_short_hash(index)) == ~(ARCH_WORD)0) ERROR: do not use assignment in if condition #254: FILE: john_core/src/AFS_fmt.c:254: + if ((binary = to_short_hash(index)) == ~(ARCH_WORD)0) ERROR: do not use assignment in if condition #266: FILE: john_core/src/AFS_fmt.c:266: + if ((binary = to_short_hash(index)) == ~(ARCH_WORD)0) WARNING: Missing a blank line after declarations #298: FILE: john_core/src/AFS_fmt.c:298: + ARCH_WORD *ptr_binary; + unsigned ARCH_WORD block[2]; WARNING: suspect code indent for conditional statements (8, 8) #312: FILE: john_core/src/AFS_fmt.c:312: + for (index = 0; index < count; index++) + if ((length = strlen(buffer[index].key)) > 8) ERROR: do not use assignment in if condition #313: FILE: john_core/src/AFS_fmt.c:313: + if ((length = strlen(buffer[index].key)) > 8) ERROR: trailing statements should be on next line #323: FILE: john_core/src/AFS_fmt.c:323: + if (!xor[pos]) xor[pos] = 'X'; WARNING: suspect code indent for conditional statements (8, 8) #332: FILE: john_core/src/AFS_fmt.c:332: + for (index = 0; index < count; index++) + if ((length = buffer[index].is_long)) { ERROR: do not use assignment in if condition #333: FILE: john_core/src/AFS_fmt.c:333: + if ((length = buffer[index].is_long)) { WARNING: suspect code indent for conditional statements (8, 8) #395: FILE: john_core/src/AFS_fmt.c:395: + for (index = 0; index < count; index++) + if (buffer[index].is_long) { WARNING: suspect code indent for conditional statements (16, 16) #433: FILE: john_core/src/AFS_fmt.c:433: + for (word = 0; word < 16 / DES_SIZE; word++) + if ((unsigned ARCH_WORD)binary[word + 2] != total: 12 errors, 7 warnings, 496 lines checked john_core/src/AFS_fmt.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: suspect code indent for conditional statements (8, 8) #31: FILE: john_core/src/batch.c:31: + if (!(name = cfg_get_param(SECTION_OPTIONS, NULL, "Wordlist"))) + if (!(name = cfg_get_param(SECTION_OPTIONS, NULL, "Wordfile"))) ERROR: do not use assignment in if condition #31: FILE: john_core/src/batch.c:31: + if (!(name = cfg_get_param(SECTION_OPTIONS, NULL, "Wordlist"))) ERROR: do not use assignment in if condition #32: FILE: john_core/src/batch.c:32: + if (!(name = cfg_get_param(SECTION_OPTIONS, NULL, "Wordfile"))) ERROR: trailing statements should be on next line #50: FILE: john_core/src/batch.c:50: + if (event_abort || !db->salts) break; ERROR: trailing statements should be on next line #55: FILE: john_core/src/batch.c:55: + if (event_abort || !db->salts) break; total: 4 errors, 1 warnings, 61 lines checked john_core/src/batch.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: trailing statements should be on next line #45: FILE: john_core/src/bench.c:45: + if (clk_tck) return; WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt #56: FILE: john_core/src/bench.c:56: +static volatile int bench_running; ERROR: trailing statements should be on next line #80: FILE: john_core/src/bench.c:80: + if ((int)strlen(plaintext) > length) break; ERROR: trailing statements should be on next line #83: FILE: john_core/src/bench.c:83: + if ((int)strlen(plaintext) <= length) break; ERROR: do not initialise statics to 0 or NULL #95: FILE: john_core/src/bench.c:95: + static void *binary = NULL; ERROR: do not initialise statics to 0 or NULL #96: FILE: john_core/src/bench.c:96: + static int binary_size = 0; ERROR: do not use assignment in if condition #113: FILE: john_core/src/bench.c:113: + if (!(current = format->params.tests)) return "FAILED (no data)"; ERROR: trailing statements should be on next line #113: FILE: john_core/src/bench.c:113: + if (!(current = format->params.tests)) return "FAILED (no data)"; ERROR: do not use assignment in if condition #114: FILE: john_core/src/bench.c:114: + if ((where = fmt_self_test(format))) { ERROR: do not use assignment in if condition #128: FILE: john_core/src/bench.c:128: + if ((ciphertext = format->params.tests[index].ciphertext)) { WARNING: Missing a blank line after declarations #130: FILE: john_core/src/bench.c:130: + char **fields = format->params.tests[index].fields; + if (!fields[1]) ERROR: trailing statements should be on next line #151: FILE: john_core/src/bench.c:151: + if (setitimer(ITIMER_REAL, &it, NULL)) pexit("setitimer"); WARNING: suspect code indent for conditional statements (8, 0) #162: FILE: john_core/src/bench.c:162: + if (!(it.it_value.tv_sec = benchmark_time)) { +/* Use exactly one tick for reasonable precision, but no less than 1 ms */ ERROR: do not use assignment in if condition #162: FILE: john_core/src/bench.c:162: + if (!(it.it_value.tv_sec = benchmark_time)) { ERROR: do not use assignment in if condition #164: FILE: john_core/src/bench.c:164: + if ((it.it_value.tv_usec = 1000000 / clk_tck) < 1000) ERROR: trailing statements should be on next line #167: FILE: john_core/src/bench.c:167: + if (setitimer(ITIMER_REAL, &it, NULL)) pexit("setitimer"); ERROR: trailing statements should be on next line #189: FILE: john_core/src/bench.c:189: + if (salts > 1) format->methods.set_salt(two_salts[index & 1]); ERROR: trailing statements should be on next line #200: FILE: john_core/src/bench.c:200: + if (end_real == start_real) end_real++; ERROR: trailing statements should be on next line #204: FILE: john_core/src/bench.c:204: + if (end_virtual == start_virtual) end_virtual++; WARNING: quoted string split across lines #247: FILE: john_core/src/bench.c:247: + puts("Warning: doing quick benchmarking - " + "the performance numbers will be inaccurate"); WARNING: suspect code indent for conditional statements (8, 8) #250: FILE: john_core/src/bench.c:250: + if ((format = fmt_list)) + do { ERROR: do not use assignment in if condition #250: FILE: john_core/src/bench.c:250: + if ((format = fmt_list)) ERROR: do not use assignment in if condition #278: FILE: john_core/src/bench.c:278: + if ((result = benchmark_format(format, WARNING: suspect code indent for conditional statements (16, 16) #286: FILE: john_core/src/bench.c:286: + if (msg_1) + if ((result = benchmark_format(format, 1, &results_1))) { ERROR: do not use assignment in if condition #287: FILE: john_core/src/bench.c:287: + if ((result = benchmark_format(format, 1, &results_1))) { total: 19 errors, 6 warnings, 328 lines checked john_core/src/bench.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: externs should be avoided in .c files #35: FILE: john_core/src/best.c:35: +extern struct fmt_main fmt_DES, fmt_MD5, fmt_BF; ERROR: trailing statements should be on next line #51: FILE: john_core/src/best.c:51: + if (argc != 2) return 1; total: 1 errors, 1 warnings, 104 lines checked john_core/src/best.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: quoted string split across lines #48: FILE: john_core/src/BF_fmt.c:48: + "0123456789abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" WARNING: break quoted strings at a space character #48: FILE: john_core/src/BF_fmt.c:48: + "0123456789abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" WARNING: quoted string split across lines #49: FILE: john_core/src/BF_fmt.c:49: + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + "chars after 72 are ignored"}, WARNING: break quoted strings at a space character #49: FILE: john_core/src/BF_fmt.c:49: + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + "chars after 72 are ignored"}, WARNING: break quoted strings at a space character #65: FILE: john_core/src/BF_fmt.c:65: + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "chars after 72 are ignored as usual"}, WARNING: Missing a blank line after declarations #100: FILE: john_core/src/BF_fmt.c:100: + int n = BF_Nmin * omp_get_max_threads(), max; + if (n < BF_Nmin) ERROR: trailing statements should be on next line #125: FILE: john_core/src/BF_fmt.c:125: + if (ciphertext[4] < '0' || ciphertext[4] > '9') return 0; ERROR: trailing statements should be on next line #126: FILE: john_core/src/BF_fmt.c:126: + if (ciphertext[5] < '0' || ciphertext[5] > '9') return 0; ERROR: trailing statements should be on next line #127: FILE: john_core/src/BF_fmt.c:127: + if (ciphertext[6] != '$') return 0; ERROR: trailing statements should be on next line #129: FILE: john_core/src/BF_fmt.c:129: + if (rounds < 4 || rounds > 31) return 0; ERROR: trailing statements should be on next line #131: FILE: john_core/src/BF_fmt.c:131: + for (pos = &ciphertext[7]; atoi64[ARCH_INDEX(*pos)] != 0x7F; pos++); ERROR: trailing statements should be on next line #132: FILE: john_core/src/BF_fmt.c:132: + if (*pos || pos - ciphertext != CIPHERTEXT_LENGTH) return 0; ERROR: trailing statements should be on next line #134: FILE: john_core/src/BF_fmt.c:134: + if (BF_atoi64[ARCH_INDEX(*(pos - 1))] & 3) return 0; ERROR: trailing statements should be on next line #135: FILE: john_core/src/BF_fmt.c:135: + if (BF_atoi64[ARCH_INDEX(ciphertext[28])] & 0xF) return 0; WARNING: Missing a blank line after declarations #254: FILE: john_core/src/BF_fmt.c:254: + int i; + for (i = 0; i < count; i++) total: 8 errors, 7 warnings, 339 lines checked john_core/src/BF_fmt.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: do not add new typedefs #42: FILE: john_core/src/BF_std.c:42: +typedef BF_word BF_key[BF_ROUNDS + 2]; ERROR: space prohibited before open square bracket '[' #50: FILE: john_core/src/BF_std.c:50: +#define INDICES [BF_N] ERROR: space prohibited before open square bracket '[' #51: FILE: john_core/src/BF_std.c:51: +#define INDEX [index] ERROR: space prohibited before open square bracket '[' #52: FILE: john_core/src/BF_std.c:52: +#define INDEX0 [index] ERROR: space prohibited before open square bracket '[' #58: FILE: john_core/src/BF_std.c:58: +#define INDEX0 [0] ERROR: space prohibited before open square bracket '[' #64: FILE: john_core/src/BF_std.c:64: +#define INDEX2 [index & 1] ERROR: space prohibited before open square bracket '[' #66: FILE: john_core/src/BF_std.c:66: +#define INDEX2 [index] ERROR: Macros with multiple statements should be enclosed in a do - while loop #81: FILE: john_core/src/BF_std.c:81: +#define for_each_ti() \ + index = t; WARNING: macros should not use a trailing semicolon #81: FILE: john_core/src/BF_std.c:81: +#define for_each_ti() \ + index = t; ERROR: Macros with multiple statements should be enclosed in a do - while loop #427: FILE: john_core/src/BF_std.c:427: +#define BF_ROUND(ctx, L, R, N, tmp1, tmp2, tmp3, tmp4) \ + tmp1 = L & 0xFF; \ + tmp2 = L >> 8; \ + tmp2 &= 0xFF; \ + tmp3 = L >> 16; \ + tmp3 &= 0xFF; \ + tmp4 = L >> 24; \ + tmp1 = ctx.S[3][tmp1]; \ + tmp2 = ctx.S[2][tmp2]; \ + tmp3 = ctx.S[1][tmp3]; \ + tmp3 += ctx.S[0][tmp4]; \ + tmp3 ^= tmp2; \ + R ^= ctx.P[N + 1]; \ + tmp3 += tmp1; \ + R ^= tmp3; WARNING: macros should not use a trailing semicolon #427: FILE: john_core/src/BF_std.c:427: +#define BF_ROUND(ctx, L, R, N, tmp1, tmp2, tmp3, tmp4) \ + tmp1 = L & 0xFF; \ + tmp2 = L >> 8; \ + tmp2 &= 0xFF; \ + tmp3 = L >> 16; \ + tmp3 &= 0xFF; \ + tmp4 = L >> 24; \ + tmp1 = ctx.S[3][tmp1]; \ + tmp2 = ctx.S[2][tmp2]; \ + tmp3 = ctx.S[1][tmp3]; \ + tmp3 += ctx.S[0][tmp4]; \ + tmp3 ^= tmp2; \ + R ^= ctx.P[N + 1]; \ + tmp3 += tmp1; \ + R ^= tmp3; ERROR: Macros with multiple statements should be enclosed in a do - while loop #446: FILE: john_core/src/BF_std.c:446: +#define BF_ROUND(ctx, L, R, N, tmp1, tmp2, tmp3, tmp4) \ + tmp1 = L & 0xFF; \ + tmp1 <<= 2; \ + tmp2 = L >> 6; \ + tmp2 &= 0x3FC; \ + tmp3 = L >> 14; \ + tmp3 &= 0x3FC; \ + tmp4 = L >> 22; \ + tmp4 &= 0x3FC; \ + tmp1 = BF_INDEX(ctx.S[3], tmp1); \ + tmp2 = BF_INDEX(ctx.S[2], tmp2); \ + tmp3 = BF_INDEX(ctx.S[1], tmp3); \ + tmp3 += BF_INDEX(ctx.S[0], tmp4); \ + tmp3 ^= tmp2; \ + R ^= ctx.P[N + 1]; \ + tmp3 += tmp1; \ + R ^= tmp3; WARNING: macros should not use a trailing semicolon #446: FILE: john_core/src/BF_std.c:446: +#define BF_ROUND(ctx, L, R, N, tmp1, tmp2, tmp3, tmp4) \ + tmp1 = L & 0xFF; \ + tmp1 <<= 2; \ + tmp2 = L >> 6; \ + tmp2 &= 0x3FC; \ + tmp3 = L >> 14; \ + tmp3 &= 0x3FC; \ + tmp4 = L >> 22; \ + tmp4 &= 0x3FC; \ + tmp1 = BF_INDEX(ctx.S[3], tmp1); \ + tmp2 = BF_INDEX(ctx.S[2], tmp2); \ + tmp3 = BF_INDEX(ctx.S[1], tmp3); \ + tmp3 += BF_INDEX(ctx.S[0], tmp4); \ + tmp3 ^= tmp2; \ + R ^= ctx.P[N + 1]; \ + tmp3 += tmp1; \ + R ^= tmp3; ERROR: Macros with multiple statements should be enclosed in a do - while loop #468: FILE: john_core/src/BF_std.c:468: +#define BF_ENCRYPT(ctx, L, R) \ + L ^= ctx.P[0]; \ + BF_ROUND(ctx, L, R, 0, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 1, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 2, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 3, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 4, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 5, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 6, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 7, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 8, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 9, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 10, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 11, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 12, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 13, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 14, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 15, u1, u2, u3, u4); \ + u4 = R; \ + R = L; \ + L = u4 ^ ctx.P[BF_ROUNDS + 1]; WARNING: macros should not use a trailing semicolon #468: FILE: john_core/src/BF_std.c:468: +#define BF_ENCRYPT(ctx, L, R) \ + L ^= ctx.P[0]; \ + BF_ROUND(ctx, L, R, 0, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 1, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 2, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 3, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 4, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 5, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 6, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 7, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 8, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 9, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 10, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 11, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 12, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 13, u1, u2, u3, u4); \ + BF_ROUND(ctx, L, R, 14, u1, u2, u3, u4); \ + BF_ROUND(ctx, R, L, 15, u1, u2, u3, u4); \ + u4 = R; \ + R = L; \ + L = u4 ^ ctx.P[BF_ROUNDS + 1]; WARNING: externs should be avoided in .c files #492: FILE: john_core/src/BF_std.c:492: +extern void (*BF_body)(void); ERROR: Macros with multiple statements should be enclosed in a do - while loop #500: FILE: john_core/src/BF_std.c:500: +#define BF_ENCRYPT2 \ + L0 ^= BF_current[0].P[0]; \ + L1 ^= BF_current[1].P[0]; \ + BF_ROUND(BF_current[0], L0, R0, 0, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 0, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 1, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 1, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 2, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 2, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 3, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 3, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 4, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 4, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 5, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 5, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 6, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 6, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 7, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 7, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 8, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 8, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 9, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 9, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 10, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 10, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 11, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 11, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 12, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 12, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 13, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 13, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 14, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 14, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 15, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 15, v1, v2, v3, v4); \ + u4 = R0; \ + v4 = R1; \ + R0 = L0; \ + R1 = L1; \ + L0 = u4 ^ BF_current[0].P[BF_ROUNDS + 1]; \ + L1 = v4 ^ BF_current[1].P[BF_ROUNDS + 1]; WARNING: macros should not use a trailing semicolon #500: FILE: john_core/src/BF_std.c:500: +#define BF_ENCRYPT2 \ + L0 ^= BF_current[0].P[0]; \ + L1 ^= BF_current[1].P[0]; \ + BF_ROUND(BF_current[0], L0, R0, 0, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 0, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 1, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 1, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 2, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 2, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 3, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 3, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 4, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 4, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 5, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 5, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 6, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 6, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 7, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 7, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 8, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 8, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 9, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 9, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 10, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 10, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 11, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 11, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 12, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 12, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 13, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 13, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], L0, R0, 14, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], L1, R1, 14, v1, v2, v3, v4); \ + BF_ROUND(BF_current[0], R0, L0, 15, u1, u2, u3, u4); \ + BF_ROUND(BF_current[1], R1, L1, 15, v1, v2, v3, v4); \ + u4 = R0; \ + v4 = R1; \ + R0 = L0; \ + R1 = L1; \ + L0 = u4 ^ BF_current[0].P[BF_ROUNDS + 1]; \ + L1 = v4 ^ BF_current[1].P[BF_ROUNDS + 1]; ERROR: Macros with multiple statements should be enclosed in a do - while loop #542: FILE: john_core/src/BF_std.c:542: +#define BF_body() \ + L0 = R0 = L1 = R1 = 0; \ + ptr = BF_current[0].P; \ + do { \ + BF_ENCRYPT2; \ + *ptr = L0; \ + *(ptr + 1) = R0; \ + *(ptr + (BF_current[1].P - BF_current[0].P)) = L1; \ + *(ptr + (BF_current[1].P - BF_current[0].P) + 1) = R1; \ + ptr += 2; \ + } while (ptr < &BF_current[0].P[BF_ROUNDS + 2]); \ +\ + ptr = BF_current[0].S[0]; \ + do { \ + ptr += 2; \ + BF_ENCRYPT2; \ + *(ptr - 2) = L0; \ + *(ptr - 1) = R0; \ + *(ptr - 2 + (BF_current[1].S[0] - BF_current[0].S[0])) = L1; \ + *(ptr - 1 + (BF_current[1].S[0] - BF_current[0].S[0])) = R1; \ + } while (ptr < &BF_current[0].S[3][0xFF]); WARNING: macros should not use a trailing semicolon #542: FILE: john_core/src/BF_std.c:542: +#define BF_body() \ + L0 = R0 = L1 = R1 = 0; \ + ptr = BF_current[0].P; \ + do { \ + BF_ENCRYPT2; \ + *ptr = L0; \ + *(ptr + 1) = R0; \ + *(ptr + (BF_current[1].P - BF_current[0].P)) = L1; \ + *(ptr + (BF_current[1].P - BF_current[0].P) + 1) = R1; \ + ptr += 2; \ + } while (ptr < &BF_current[0].P[BF_ROUNDS + 2]); \ +\ + ptr = BF_current[0].S[0]; \ + do { \ + ptr += 2; \ + BF_ENCRYPT2; \ + *(ptr - 2) = L0; \ + *(ptr - 1) = R0; \ + *(ptr - 2 + (BF_current[1].S[0] - BF_current[0].S[0])) = L1; \ + *(ptr - 1 + (BF_current[1].S[0] - BF_current[0].S[0])) = R1; \ + } while (ptr < &BF_current[0].S[3][0xFF]); ERROR: Macros with multiple statements should be enclosed in a do - while loop #564: FILE: john_core/src/BF_std.c:564: +#define BF_body() \ + L0 = R0 = 0; \ + ptr = BF_current.P; \ + do { \ + BF_ENCRYPT(BF_current, L0, R0); \ + *ptr = L0; \ + *(ptr + 1) = R0; \ + ptr += 2; \ + } while (ptr < &BF_current.P[BF_ROUNDS + 2]); \ +\ + ptr = BF_current.S[0]; \ + do { \ + ptr += 2; \ + BF_ENCRYPT(BF_current, L0, R0); \ + *(ptr - 2) = L0; \ + *(ptr - 1) = R0; \ + } while (ptr < &BF_current.S[3][0xFF]); WARNING: macros should not use a trailing semicolon #564: FILE: john_core/src/BF_std.c:564: +#define BF_body() \ + L0 = R0 = 0; \ + ptr = BF_current.P; \ + do { \ + BF_ENCRYPT(BF_current, L0, R0); \ + *ptr = L0; \ + *(ptr + 1) = R0; \ + ptr += 2; \ + } while (ptr < &BF_current.P[BF_ROUNDS + 2]); \ +\ + ptr = BF_current.S[0]; \ + do { \ + ptr += 2; \ + BF_ENCRYPT(BF_current, L0, R0); \ + *(ptr - 2) = L0; \ + *(ptr - 1) = R0; \ + } while (ptr < &BF_current.S[3][0xFF]); ERROR: trailing statements should be on next line #600: FILE: john_core/src/BF_std.c:600: + if (!*ptr) ptr = key; else ptr++; WARNING: line over 80 characters #615: FILE: john_core/src/BF_std.c:615: +#pragma omp parallel for default(none) private(t) shared(n, BF_init_state, BF_init_key, BF_exp_key, salt, BF_magic_w, BF_out) ERROR: trailing statements should be on next line #806: FILE: john_core/src/BF_std.c:806: + if (dptr >= end) break; ERROR: trailing statements should be on next line #810: FILE: john_core/src/BF_std.c:810: + if (dptr >= end) break; total: 16 errors, 10 warnings, 843 lines checked john_core/src/BF_std.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: trailing statements should be on next line #112: FILE: john_core/src/BSDI_fmt.c:112: + if (ciphertext[0] != '_') return 0; WARNING: suspect code indent for conditional statements (8, 8) #114: FILE: john_core/src/BSDI_fmt.c:114: + for (pos = &ciphertext[1]; pos < &ciphertext[9]; pos++) + if (!*pos) return 0; ERROR: trailing statements should be on next line #115: FILE: john_core/src/BSDI_fmt.c:115: + if (!*pos) return 0; ERROR: trailing statements should be on next line #117: FILE: john_core/src/BSDI_fmt.c:117: + for (pos = &ciphertext[9]; atoi64[ARCH_INDEX(*pos)] != 0x7F; pos++); ERROR: trailing statements should be on next line #118: FILE: john_core/src/BSDI_fmt.c:118: + if (*pos || pos - ciphertext != CIPHERTEXT_LENGTH) return 0; ERROR: trailing statements should be on next line #120: FILE: john_core/src/BSDI_fmt.c:120: + if (atoi64[ARCH_INDEX(*(pos - 1))] & 3) return 0; ERROR: "(foo*)" should be "(foo *)" #250: FILE: john_core/src/BSDI_fmt.c:250: + saved_salt = *(ARCH_WORD*)salt; WARNING: Missing a blank line after declarations #260: FILE: john_core/src/BSDI_fmt.c:260: + int pos, word; + unsigned ARCH_WORD block[2]; ERROR: trailing statements should be on next line #272: FILE: john_core/src/BSDI_fmt.c:272: + for (pos = 0, ptr = key; pos < 8 && *ptr; pos++, ptr++); WARNING: suspect code indent for conditional statements (16, 16) #277: FILE: john_core/src/BSDI_fmt.c:277: + for (word = 0; word < 2; word++) + for (pos = 0; pos < 4; pos++) WARNING: suspect code indent for conditional statements (16, 16) #292: FILE: john_core/src/BSDI_fmt.c:292: + for (word = 0; word < 2; word++) + for (pos = 0; pos < 4; pos++) { ERROR: trailing statements should be on next line #296: FILE: john_core/src/BSDI_fmt.c:296: + if (*ptr) ptr++; WARNING: Missing a blank line after declarations #326: FILE: john_core/src/BSDI_fmt.c:326: + int count = *pcount; + DES_bs_crypt(saved_count, count); WARNING: suspect code indent for conditional statements (8, 8) #363: FILE: john_core/src/BSDI_fmt.c:363: + for (index = 0; index < count; index++) + if (*(unsigned ARCH_WORD *)binary == WARNING: suspect code indent for conditional statements (8, 8) #384: FILE: john_core/src/BSDI_fmt.c:384: + for (word = 0; word < 16 / DES_SIZE; word++) + if ((unsigned ARCH_WORD)binary[word] != total: 8 errors, 7 warnings, 464 lines checked john_core/src/BSDI_fmt.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: Missing a blank line after declarations #133: FILE: john_core/src/c3_fmt.c:133: + struct crypt_data **data = &crypt_data[0]; + if (!*data) { WARNING: suspect code indent for conditional statements (16, 0) #133: FILE: john_core/src/c3_fmt.c:133: + if (!*data) { +/* WARNING: quoted string split across lines #158: FILE: john_core/src/c3_fmt.c:158: + fprintf(stderr, "Warning: " + "hash encoding string length %d, type id %c%c\n" WARNING: Missing a blank line after declarations #173: FILE: john_core/src/c3_fmt.c:173: + static char out[BINARY_SIZE]; + strncpy(out, ciphertext, sizeof(out)); /* NUL padding is required */ ERROR: trailing statements should be on next line #193: FILE: john_core/src/c3_fmt.c:193: + if (ciphertext[0] == '_') cut = 9; ERROR: trailing statements should be on next line #199: FILE: john_core/src/c3_fmt.c:199: + if (ciphertext[0] != '$') cut = 2; WARNING: Missing a blank line after declarations #208: FILE: john_core/src/c3_fmt.c:208: + char *p = strrchr(ciphertext + 3, '$'); + if (p) cut = p - ciphertext; ERROR: trailing statements should be on next line #208: FILE: john_core/src/c3_fmt.c:208: + if (p) cut = p - ciphertext; WARNING: Missing a blank line after declarations #223: FILE: john_core/src/c3_fmt.c:223: + char *p = strrchr(ciphertext + 4, '$'); + if (p) { WARNING: Macros with flow control statements should be avoided #251: FILE: john_core/src/c3_fmt.c:251: +#define H0(s) \ + int i = strlen(s) - 2; \ + return i > 0 ? H((s), i) & 0xF : 0 +#define H1(s) \ WARNING: Macros with flow control statements should be avoided #254: FILE: john_core/src/c3_fmt.c:254: +#define H1(s) \ + int i = strlen(s) - 2; \ + return i > 2 ? (H((s), i) ^ (H((s), i - 2) << 4)) & 0xFF : 0 +#define H2(s) \ WARNING: Macros with flow control statements should be avoided #257: FILE: john_core/src/c3_fmt.c:257: +#define H2(s) \ + int i = strlen(s) - 2; \ + return i > 2 ? (H((s), i) ^ (H((s), i - 2) << 6)) & 0xFFF : 0 +#define H3(s) \ WARNING: Macros with flow control statements should be avoided #260: FILE: john_core/src/c3_fmt.c:260: +#define H3(s) \ + int i = strlen(s) - 2; \ + return i > 4 ? (H((s), i) ^ (H((s), i - 2) << 5) ^ \ + (H((s), i - 4) << 10)) & 0xFFFF : 0 +#define H4(s) \ WARNING: Macros with flow control statements should be avoided #264: FILE: john_core/src/c3_fmt.c:264: +#define H4(s) \ + int i = strlen(s) - 2; \ + return i > 6 ? (H((s), i) ^ (H((s), i - 2) << 5) ^ \ + (H((s), i - 4) << 10) ^ (H((s), i - 6) << 15)) & 0xFFFFF : 0 + ERROR: trailing statements should be on next line #324: FILE: john_core/src/c3_fmt.c:324: + if (i > 1) i--; ERROR: do not initialise statics to 0 or NULL #352: FILE: john_core/src/c3_fmt.c:352: + static int warned = 0; WARNING: line over 80 characters #357: FILE: john_core/src/c3_fmt.c:357: +#pragma omp parallel for default(none) private(index) shared(warned, count, crypt_out, saved_key, saved_salt, crypt_data, stderr) WARNING: Missing a blank line after declarations #361: FILE: john_core/src/c3_fmt.c:361: + int t = omp_get_thread_num(); + if (t < MAX_THREADS) { WARNING: Missing a blank line after declarations #363: FILE: john_core/src/c3_fmt.c:363: + struct crypt_data **data = &crypt_data[t]; + if (!*data) { WARNING: suspect code indent for conditional statements (24, 0) #363: FILE: john_core/src/c3_fmt.c:363: + if (!*data) { +/* Stagger the structs to reduce their competition for the same cache lines */ WARNING: Missing a blank line after declarations #366: FILE: john_core/src/c3_fmt.c:366: + size_t mask = MEM_ALIGN_PAGE, shift = 0; + while (t) { WARNING: Missing a blank line after declarations #382: FILE: john_core/src/c3_fmt.c:382: + struct crypt_data data; + memset(&data, 0, sizeof(data)); WARNING: line over 80 characters #407: FILE: john_core/src/c3_fmt.c:407: +#pragma omp parallel for default(none) private(index) shared(warned, count, crypt_out, saved_key, saved_salt, stderr) WARNING: Missing a blank line after declarations #411: FILE: john_core/src/c3_fmt.c:411: + char *hash = crypt(saved_key[index], saved_salt); + if (!hash) { total: 5 errors, 19 warnings, 504 lines checked john_core/src/c3_fmt.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: please, no spaces at the start of a line #33: FILE: john_core/src/charset.c:33: + struct list_main **lists)$ WARNING: suspect code indent for conditional statements (8, 8) #45: FILE: john_core/src/charset.c:45: + if ((current = db->plaintexts->head)) + do { ERROR: do not use assignment in if condition #45: FILE: john_core/src/charset.c:45: + if ((current = db->plaintexts->head)) WARNING: Missing a blank line after declarations #78: FILE: john_core/src/charset.c:78: + int c = *(unsigned char *)ptr; + if (c < CHARSET_MIN || c > CHARSET_MAX) WARNING: Missing a blank line after declarations #161: FILE: john_core/src/charset.c:161: + unsigned char values[4]; + if (fread(values, sizeof(values), 1, file) != 1) ERROR: do not use assignment in if condition #179: FILE: john_core/src/charset.c:179: + if ((result = length < CHARSET_LENGTH)) { ERROR: do not use assignment in if condition #183: FILE: john_core/src/charset.c:183: + if ((offset = ftell(file)) < 0) pexit("ftell"); ERROR: trailing statements should be on next line #183: FILE: john_core/src/charset.c:183: + if ((offset = ftell(file)) < 0) pexit("ftell"); WARNING: do not add new typedefs #193: FILE: john_core/src/charset.c:193: +typedef struct { WARNING: Missing a blank line after declarations #203: FILE: john_core/src/charset.c:203: + int diff = (int)c2->value - (int)c1->value; + if (diff) WARNING: suspect code indent for conditional statements (16, 16) #224: FILE: john_core/src/charset.c:224: + if ((current = lists[length]->head)) + do { ERROR: do not use assignment in if condition #224: FILE: john_core/src/charset.c:224: + if ((current = lists[length]->head)) WARNING: Missing a blank line after declarations #227: FILE: john_core/src/charset.c:227: + char *ptr; + for (ptr = current->data; *ptr; ptr++) { WARNING: Missing a blank line after declarations #237: FILE: john_core/src/charset.c:237: + unsigned int value = (*chars)[0][0][k]; + if (value) { WARNING: suspect code indent for conditional statements (8, 8) #253: FILE: john_core/src/charset.c:253: + for (length = 0; charset_new_length(length, header, file); length++) + for (pos = 0; pos <= length; pos++) { ERROR: do not use assignment in if condition #258: FILE: john_core/src/charset.c:258: + if (!(current = lists[length]->head)) WARNING: suspect code indent for conditional statements (16, 16) #301: FILE: john_core/src/charset.c:301: + for (i = (pos > 1 ? 0 : CHARSET_SIZE); i <= CHARSET_SIZE; i++) + for (j = (pos ? 0 : CHARSET_SIZE); j <= CHARSET_SIZE; j++) { WARNING: Missing a blank line after declarations #306: FILE: john_core/src/charset.c:306: + unsigned int value = (*chars)[i][j][k]; + if (value) { WARNING: Missing a blank line after declarations #339: FILE: john_core/src/charset.c:339: + double a = 1.0; + if (y) { WARNING: Missing a blank line after declarations #341: FILE: john_core/src/charset.c:341: + double b = x; + do { WARNING: do not add new typedefs #352: FILE: john_core/src/charset.c:352: +typedef struct { WARNING: Missing a blank line after declarations #362: FILE: john_core/src/charset.c:362: + int diff; + if (r1->value < r2->value) WARNING: Missing a blank line after declarations #411: FILE: john_core/src/charset.c:411: + unsigned char *ptr, *end; + ratio_sort_t (*ratios) WARNING: suspect code indent for conditional statements (8, 8) #422: FILE: john_core/src/charset.c:422: + for (length = 0; length < CHARSET_LENGTH; length++) + for (count = 0; count < CHARSET_SIZE; count++) { WARNING: suspect code indent for conditional statements (8, 0) #423: FILE: john_core/src/charset.c:423: + for (count = 0; count < CHARSET_SIZE; count++) { +/* First, calculate the number of candidate passwords for this combination of WARNING: Missing a blank line after declarations #444: FILE: john_core/src/charset.c:444: + unsigned int div = (*cracks)[length][pos][count]; + if (div) WARNING: suspect code indent for conditional statements (8, 0) #474: FILE: john_core/src/charset.c:474: + do { +/* Find the minimum non-taken ratio and its corresponding combination */ WARNING: quoted string split across lines #539: FILE: john_core/src/charset.c:539: + printf(" Unstable order (%d recalculations, " + "%d differences remain)\n", recalcs, diff); WARNING: Missing a blank line after declarations #569: FILE: john_core/src/charset.c:569: + int i; + for (i = 0; i <= length; i++) WARNING: suspect code indent for conditional statements (24, 24) #569: FILE: john_core/src/charset.c:569: + for (i = 0; i <= length; i++) + if (i != pos) WARNING: suspect code indent for conditional statements (24, 24) #583: FILE: john_core/src/charset.c:583: + for (i = 0; i <= length; i++) + if (i != pos) { WARNING: Missing a blank line after declarations #589: FILE: john_core/src/charset.c:589: + int mincount = curcount; + if (mincount > relcount) ERROR: do not use assignment in if condition #639: FILE: john_core/src/charset.c:639: + if (!(file = fopen(path_expand(charset), "wb"))) total: 7 errors, 26 warnings, 716 lines checked john_core/src/charset.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: do not initialise statics to 0 or NULL #24: FILE: john_core/src/common.c:24: +static int initialized = 0; ERROR: trailing statements should be on next line #30: FILE: john_core/src/common.c:30: + if (initialized) return; total: 2 errors, 0 warnings, 48 lines checked john_core/src/common.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: suspect code indent for conditional statements (8, 8) #129: FILE: john_core/src/compiler.c:129: + for (c = 0; c < 0x100; c++) + if (c < 0x80) ERROR: trailing statements should be on next line #163: FILE: john_core/src/compiler.c:163: + if (c_unget_count) return c_unget_buffer[--c_unget_count]; ERROR: do not use assignment in if condition #164: FILE: john_core/src/compiler.c:164: + if ((c = c_ext_getchar()) > 0) return c; ERROR: trailing statements should be on next line #164: FILE: john_core/src/compiler.c:164: + if ((c = c_ext_getchar()) > 0) return c; ERROR: trailing statements should be on next line #178: FILE: john_core/src/compiler.c:178: + if (quote || c_EOF) return c; ERROR: trailing statements should be on next line #180: FILE: john_core/src/compiler.c:180: + if (c <= ' ') space = 1; else WARNING: suspect code indent for conditional statements (16, 16) #181: FILE: john_core/src/compiler.c:181: + if (c == '/') + switch ((c = c_buffer_getchar())) { WARNING: suspect code indent for conditional statements (32, 32) #192: FILE: john_core/src/compiler.c:192: + if ((c = c_buffer_getchar()) == '*') + if ((c = c_buffer_getchar()) == '/') ERROR: do not use assignment in if condition #192: FILE: john_core/src/compiler.c:192: + if ((c = c_buffer_getchar()) == '*') ERROR: do not use assignment in if condition #193: FILE: john_core/src/compiler.c:193: + if ((c = c_buffer_getchar()) == '/') WARNING: suspect code indent for conditional statements (8, 8) #218: FILE: john_core/src/compiler.c:218: + while (c_isident[ARCH_INDEX(token[pos++] = c_getchar(0))]) + if (pos >= C_TOKEN_SIZE) { ERROR: trailing statements should be on next line #224: FILE: john_core/src/compiler.c:224: + if (pos != 1) c_ungetchar(token[--pos]); ERROR: do not use assignment in if condition #237: FILE: john_core/src/compiler.c:237: + if ((value = (unsigned char)c_getchar(1)) == '\'') ERROR: do not use assignment in if condition #262: FILE: john_core/src/compiler.c:262: + if ((c = c_getchar(0)) == ' ') c = c_getchar(0); ERROR: trailing statements should be on next line #262: FILE: john_core/src/compiler.c:262: + if ((c = c_getchar(0)) == ' ') c = c_getchar(0); WARNING: suspect code indent for conditional statements (8, 8) #271: FILE: john_core/src/compiler.c:271: + if ((c = c_getchar(0)) == ' ') + if (expected != ' ') c = c_getchar(0); ERROR: do not use assignment in if condition #271: FILE: john_core/src/compiler.c:271: + if ((c = c_getchar(0)) == ' ') ERROR: trailing statements should be on next line #272: FILE: john_core/src/compiler.c:272: + if (expected != ' ') c = c_getchar(0); ERROR: trailing statements should be on next line #274: FILE: john_core/src/compiler.c:274: + if (c != expected) c_errno = C_ERROR_UNEXPECTED; WARNING: suspect code indent for conditional statements (8, 8) #284: FILE: john_core/src/compiler.c:284: + if ((current = list) != globals) + do { ERROR: do not use assignment in if condition #284: FILE: john_core/src/compiler.c:284: + if ((current = list) != globals) ERROR: trailing statements should be on next line #286: FILE: john_core/src/compiler.c:286: + if (!strcmp(name, current->name)) break; ERROR: trailing statements should be on next line #303: FILE: john_core/src/compiler.c:303: + if (!strcmp(name, *current)) return c_errno = C_ERROR_RESERVED; ERROR: trailing statements should be on next line #306: FILE: john_core/src/compiler.c:306: + if (c_find_ident(*list, globals, name)) return c_errno = C_ERROR_DUPE; WARNING: suspect code indent for conditional statements (16, 16) #334: FILE: john_core/src/compiler.c:334: + if ((c_ops[op].class != C_CLASS_LEFT && left) || [...] + if (!memcmp(c_ops[op].name, token, strlen(c_ops[op].name))) WARNING: suspect code indent for conditional statements (16, 16) #336: FILE: john_core/src/compiler.c:336: + if (!memcmp(c_ops[op].name, token, strlen(c_ops[op].name))) + if (best < 0 || ERROR: trailing statements should be on next line #437: FILE: john_core/src/compiler.c:437: + if (!c_isstart(*token)) c_errno = C_ERROR_UNEXPECTED; ERROR: trailing statements should be on next line #441: FILE: john_core/src/compiler.c:441: + if (!c_isstart(*token)) c_errno = C_ERROR_UNEXPECTED; ERROR: trailing statements should be on next line #442: FILE: john_core/src/compiler.c:442: + if (c_errno) return c_errno; ERROR: do not use assignment in if condition #444: FILE: john_core/src/compiler.c:444: + if ((c = c_skip_space()) == '(') { ERROR: trailing statements should be on next line #445: FILE: john_core/src/compiler.c:445: + if (term) return c_errno = C_ERROR_NESTEDFUNC; ERROR: trailing statements should be on next line #451: FILE: john_core/src/compiler.c:451: + if (c_expect('{')) return c_errno; WARNING: else is not generally useful after a break or return #460: FILE: john_core/src/compiler.c:460: + break; + } else { ERROR: trailing statements should be on next line #466: FILE: john_core/src/compiler.c:466: + if (c_errno) return c_errno; ERROR: trailing statements should be on next line #480: FILE: john_core/src/compiler.c:480: + if (c == ';') break; ERROR: trailing statements should be on next line #481: FILE: john_core/src/compiler.c:481: + if (c != ',') c_errno = C_ERROR_UNEXPECTED; ERROR: trailing statements should be on next line #501: FILE: john_core/src/compiler.c:501: + if (term == ')') stack[sp++] = -1; ERROR: trailing statements should be on next line #507: FILE: john_core/src/compiler.c:507: + if (stack[--sp] < 0) break; ERROR: trailing statements should be on next line #516: FILE: john_core/src/compiler.c:516: + if (!stack[sp]) break; ERROR: trailing statements should be on next line #523: FILE: john_core/src/compiler.c:523: + if (c_errno || (!sp && c == term)) break; ERROR: do not use assignment in if condition #553: FILE: john_core/src/compiler.c:553: + if ((lookahead = !token[1])) { ERROR: do not use assignment in if condition #559: FILE: john_core/src/compiler.c:559: + if ((op = c_find_op(token, left)) < 0) { WARNING: suspect code indent for conditional statements (32, 32) #567: FILE: john_core/src/compiler.c:567: + if (lookahead) + if (strlen(c_ops[op].name) < 3) { WARNING: suspect code indent for conditional statements (40, 40) #578: FILE: john_core/src/compiler.c:578: + if (op2->dir == C_RIGHT_TO_LEFT) + if (op2->prec <= op1->prec) break; ERROR: trailing statements should be on next line #579: FILE: john_core/src/compiler.c:579: + if (op2->prec <= op1->prec) break; WARNING: suspect code indent for conditional statements (40, 40) #581: FILE: john_core/src/compiler.c:581: + if (op2->dir == C_LEFT_TO_RIGHT) + if (op2->prec < op1->prec) break; ERROR: trailing statements should be on next line #582: FILE: john_core/src/compiler.c:582: + if (op2->prec < op1->prec) break; ERROR: trailing statements should be on next line #605: FILE: john_core/src/compiler.c:605: + if (c_errno || c == ';' || (c == term && c != ')')) break; ERROR: trailing statements should be on next line #609: FILE: john_core/src/compiler.c:609: + if (c_errno) return c_errno; ERROR: trailing statements should be on next line #611: FILE: john_core/src/compiler.c:611: + if (sp || balance) c_errno = C_ERROR_COUNT; ERROR: trailing statements should be on next line #624: FILE: john_core/src/compiler.c:624: + if (!term && !c_errno) c_errno = C_ERROR_NOTINFUNC; ERROR: trailing statements should be on next line #625: FILE: john_core/src/compiler.c:625: + if (*token == term) return -1; ERROR: trailing statements should be on next line #637: FILE: john_core/src/compiler.c:637: + if (!term) return c_errno = C_ERROR_NOTINFUNC; ERROR: trailing statements should be on next line #642: FILE: john_core/src/compiler.c:642: + if (c_expect('(')) return c_errno; WARNING: suspect code indent for conditional statements (16, 16) #686: FILE: john_core/src/compiler.c:686: + while (*(token = c_gettoken()) == ' ') + if (c_errno) return c_errno; ERROR: trailing statements should be on next line #687: FILE: john_core/src/compiler.c:687: + if (c_errno) return c_errno; ERROR: trailing statements should be on next line #697: FILE: john_core/src/compiler.c:697: + if (c_block(';', vars)) return c_errno; ERROR: trailing statements should be on next line #700: FILE: john_core/src/compiler.c:700: + while (pos > token) c_ungetchar(*--pos); ERROR: trailing statements should be on next line #713: FILE: john_core/src/compiler.c:713: + if (!c_loop_start) return c_errno = C_ERROR_NOTINLOOP; ERROR: trailing statements should be on next line #731: FILE: john_core/src/compiler.c:731: + if (!c_loop_start) return c_errno = C_ERROR_NOTINLOOP; ERROR: trailing statements should be on next line #751: FILE: john_core/src/compiler.c:751: + if (!term) return c_errno = C_ERROR_NOTINFUNC; ERROR: trailing statements should be on next line #774: FILE: john_core/src/compiler.c:774: + if (*token == ' ') continue; ERROR: trailing statements should be on next line #777: FILE: john_core/src/compiler.c:777: + if (!term) return c_errno = C_ERROR_NOTINFUNC; ERROR: trailing statements should be on next line #779: FILE: john_core/src/compiler.c:779: + if (term == ';') term = '}'; else ERROR: trailing statements should be on next line #780: FILE: john_core/src/compiler.c:780: + if (c_block('}', locals)) break; else continue; ERROR: trailing statements should be on next line #784: FILE: john_core/src/compiler.c:784: + if (c_define(term, &locals, vars)) break; ERROR: trailing statements should be on next line #788: FILE: john_core/src/compiler.c:788: + if (c_cond(term, locals, token)) break; WARNING: else is not generally useful after a break or return #793: FILE: john_core/src/compiler.c:793: + return c_errno = C_ERROR_NOTINIF; + else ERROR: trailing statements should be on next line #796: FILE: john_core/src/compiler.c:796: + if (c_continue()) break; ERROR: trailing statements should be on next line #800: FILE: john_core/src/compiler.c:800: + if (c_break()) break; ERROR: trailing statements should be on next line #804: FILE: john_core/src/compiler.c:804: + if (c_return(term)) break; ERROR: trailing statements should be on next line #808: FILE: john_core/src/compiler.c:808: + if (c_expr(term, locals, token, 1)) break; ERROR: trailing statements should be on next line #810: FILE: john_core/src/compiler.c:810: + if (c_errno) break; ERROR: trailing statements should be on next line #815: FILE: john_core/src/compiler.c:815: + if (c_errno && c_EOF) c_errno = C_ERROR_EOF; ERROR: trailing statements should be on next line #846: FILE: john_core/src/compiler.c:846: + if (c_errno || c_pass) break; WARNING: Missing a blank line after declarations #859: FILE: john_core/src/compiler.c:859: + struct c_ident *f = c_find_ident(c_funcs, NULL, name); + if (f) WARNING: Missing a blank line after declarations #876: FILE: john_core/src/compiler.c:876: + int i = 0; + while (c_ops[i].op != op && c_ops[i].prec >= 0) ERROR: do not use assignment in if condition #1259: FILE: john_core/src/compiler.c:1259: + if ((c_sp -= 2)->imm) total: 62 errors, 16 warnings, 1639 lines checked john_core/src/compiler.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: do not initialise statics to 0 or NULL #25: FILE: john_core/src/config.c:25: +static struct cfg_section *cfg_database = NULL; ERROR: trailing statements should be on next line #31: FILE: john_core/src/config.c:31: + while (*s && (*s == ' ' || *s == '\t')) s++; ERROR: trailing statements should be on next line #32: FILE: john_core/src/config.c:32: + if (!*s) return s; ERROR: trailing statements should be on next line #35: FILE: john_core/src/config.c:35: + while (e >= s && (*e == ' ' || *e == '\t')) e--; ERROR: trailing statements should be on next line #97: FILE: john_core/src/config.c:97: + if (!*line || *line == '#' || *line == ';') return 0; ERROR: do not use assignment in if condition #100: FILE: john_core/src/config.c:100: + if ((p = strchr(line, ']'))) *p = 0; else return 1; ERROR: trailing statements should be on next line #100: FILE: john_core/src/config.c:100: + if ((p = strchr(line, ']'))) *p = 0; else return 1; ERROR: do not use assignment in if condition #106: FILE: john_core/src/config.c:106: + if (cfg_database && (p = strchr(line, '='))) { ERROR: trailing statements should be on next line #130: FILE: john_core/src/config.c:130: + if (cfg_database) return; ERROR: do not use assignment in if condition #132: FILE: john_core/src/config.c:132: + if (!(file = fopen(path_expand(name), "r"))) { ERROR: trailing statements should be on next line #133: FILE: john_core/src/config.c:133: + if (allow_missing && errno == ENOENT) return; WARNING: suspect code indent for conditional statements (8, 8) #138: FILE: john_core/src/config.c:138: + while (fgetl(line, sizeof(line), file)) + if (cfg_process_line(line, ++number)) cfg_error(name, number); ERROR: trailing statements should be on next line #139: FILE: john_core/src/config.c:139: + if (cfg_process_line(line, ++number)) cfg_error(name, number); ERROR: trailing statements should be on next line #141: FILE: john_core/src/config.c:141: + if (ferror(file)) pexit("fgets"); ERROR: trailing statements should be on next line #143: FILE: john_core/src/config.c:143: + if (fclose(file)) pexit("fclose"); WARNING: suspect code indent for conditional statements (8, 8) #153: FILE: john_core/src/config.c:153: + if ((current = cfg_database)) + do { ERROR: do not use assignment in if condition #153: FILE: john_core/src/config.c:153: + if ((current = cfg_database)) ERROR: trailing statements should be on next line #159: FILE: john_core/src/config.c:159: + if (*p2) continue; WARNING: suspect code indent for conditional statements (16, 16) #161: FILE: john_core/src/config.c:161: + if ((p2 = subsection)) + while (*p1 && *p1 == tolower((int)(unsigned char)*p2)) { ERROR: do not use assignment in if condition #161: FILE: john_core/src/config.c:161: + if ((p2 = subsection)) ERROR: trailing statements should be on next line #165: FILE: john_core/src/config.c:165: + if (*p1) continue; ERROR: trailing statements should be on next line #166: FILE: john_core/src/config.c:166: + if (p2) if (*p2) continue; ERROR: do not use assignment in if condition #178: FILE: john_core/src/config.c:178: + if ((current = cfg_get_section(section, subsection))) WARNING: suspect code indent for conditional statements (8, 8) #190: FILE: john_core/src/config.c:190: + if ((current_section = cfg_get_section(section, subsection))) + if ((current_param = current_section->params)) ERROR: do not use assignment in if condition #190: FILE: john_core/src/config.c:190: + if ((current_section = cfg_get_section(section, subsection))) WARNING: suspect code indent for conditional statements (8, 8) #191: FILE: john_core/src/config.c:191: + if ((current_param = current_section->params)) + do { ERROR: do not use assignment in if condition #191: FILE: john_core/src/config.c:191: + if ((current_param = current_section->params)) ERROR: trailing statements should be on next line #197: FILE: john_core/src/config.c:197: + if (*p1 || *p2) continue; ERROR: do not use assignment in if condition #210: FILE: john_core/src/config.c:210: + if ((s_value = cfg_get_param(section, subsection, param))) { ERROR: do not use assignment in if condition #224: FILE: john_core/src/config.c:224: + if (!(value = cfg_get_param(section, subsection, param))) total: 25 errors, 5 warnings, 237 lines checked john_core/src/config.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: do not initialise statics to 0 or NULL #59: FILE: john_core/src/cracker.c:59: + static int printed = 0; WARNING: Missing a blank line after declarations #60: FILE: john_core/src/cracker.c:60: + static int printed = 0; + if (!john_main_process || printed) WARNING: quoted string split across lines #63: FILE: john_core/src/cracker.c:63: + fprintf(stderr, "Press 'q' or Ctrl-C to abort, " + "almost any other key for status\n"); WARNING: suspect code indent for conditional statements (8, 8) #81: FILE: john_core/src/cracker.c:81: + if (db->loaded && db->format->methods.reset == fmt_default_reset) + if ((where = fmt_self_test(db->format))) { ERROR: do not use assignment in if condition #82: FILE: john_core/src/cracker.c:82: + if ((where = fmt_self_test(db->format))) { ERROR: trailing statements should be on next line #92: FILE: john_core/src/cracker.c:92: + if (db->loaded) crk_init_salt(); WARNING: Missing a blank line after declarations #269: FILE: john_core/src/cracker.c:269: + int64 effective_count; + mul32by32(&effective_count, salt->count, count); WARNING: suspect code indent for conditional statements (24, 24) #279: FILE: john_core/src/cracker.c:279: + if (crk_methods.cmp_all(pw->binary, match)) + for (index = 0; index < match; index++) WARNING: suspect code indent for conditional statements (24, 24) #280: FILE: john_core/src/cracker.c:280: + for (index = 0; index < match; index++) + if (crk_methods.cmp_one(pw->binary, index)) WARNING: suspect code indent for conditional statements (24, 24) #281: FILE: john_core/src/cracker.c:281: + if (crk_methods.cmp_one(pw->binary, index)) + if (crk_methods.cmp_exact(crk_methods.source( WARNING: else is not generally useful after a break or return #286: FILE: john_core/src/cracker.c:286: + return 1; + else WARNING: Missing a blank line after declarations #293: FILE: john_core/src/cracker.c:293: + int hash = salt->index(index); + if (salt->bitmap[hash / (sizeof(*salt->bitmap) * 8)] & WARNING: suspect code indent for conditional statements (32, 32) #297: FILE: john_core/src/cracker.c:297: + if (crk_methods.cmp_one(pw->binary, index)) + if (crk_methods.cmp_exact(crk_methods.source( WARNING: suspect code indent for conditional statements (32, 32) #298: FILE: john_core/src/cracker.c:298: + if (crk_methods.cmp_exact(crk_methods.source( [...] + if (crk_process_guess(salt, pw, index)) ERROR: do not use assignment in if condition #317: FILE: john_core/src/cracker.c:317: + if ((done = crk_password_loop(salt))) WARNING: suspect code indent for conditional statements (8, 8) #360: FILE: john_core/src/cracker.c:360: + if (event_pending) + if (crk_process_event()) return 1; ERROR: trailing statements should be on next line #361: FILE: john_core/src/cracker.c:361: + if (crk_process_event()) return 1; WARNING: Missing a blank line after declarations #410: FILE: john_core/src/cracker.c:410: + int done; + crk_key_index = index; WARNING: suspect code indent for conditional statements (24, 0) #411: FILE: john_core/src/cracker.c:411: + if ((done = crk_password_loop(salt)) >= 0) { +/* ERROR: do not use assignment in if condition #411: FILE: john_core/src/cracker.c:411: + if ((done = crk_password_loop(salt)) >= 0) { WARNING: else is not generally useful after a break or return #452: FILE: john_core/src/cracker.c:452: + return crk_methods.get_key(crk_key_index - 1); + else total: 6 errors, 15 warnings, 467 lines checked john_core/src/cracker.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: do not initialise statics to 0 or NULL #28: FILE: john_core/src/crc32.c:28: +static CRC32_t *table = NULL; ERROR: trailing statements should be on next line #37: FILE: john_core/src/crc32.c:37: + if (table) return; WARNING: suspect code indent for conditional statements (16, 16) #45: FILE: john_core/src/crc32.c:45: + for (bit = 0; bit < 8; bit++) + if (entry & 1) { WARNING: suspect code indent for conditional statements (8, 8) #66: FILE: john_core/src/crc32.c:66: + if (count) + do { total: 2 errors, 2 warnings, 81 lines checked john_core/src/crc32.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: line over 80 characters #11: FILE: john_core/src/DES_bs_b.c:11: +#warning Assembly code and OpenMP are both requested - will provide the former, but not the latter (for DES-based hashes). This may likely be corrected by enabling SIMD intrinsics with the C compiler (try adding -msse2 to OMPFLAGS). WARNING: do not add new typedefs #30: FILE: john_core/src/DES_bs_b.c:30: +typedef vector signed int vtype; ERROR: Macros with complex values should be enclosed in parentheses #38: FILE: john_core/src/DES_bs_b.c:38: +#define vnot(dst, a) \ + (dst) = vec_nor((a), (a)) ERROR: Macros with complex values should be enclosed in parentheses #40: FILE: john_core/src/DES_bs_b.c:40: +#define vand(dst, a, b) \ + (dst) = vec_and((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #42: FILE: john_core/src/DES_bs_b.c:42: +#define vor(dst, a, b) \ + (dst) = vec_or((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #44: FILE: john_core/src/DES_bs_b.c:44: +#define vandn(dst, a, b) \ + (dst) = vec_andc((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #46: FILE: john_core/src/DES_bs_b.c:46: +#define vsel(dst, a, b, c) \ + (dst) = vec_sel((a), (b), (vector bool int)(c)) WARNING: please, no spaces at the start of a line #50: FILE: john_core/src/DES_bs_b.c:50: + ((ARCH_BITS == 64 && DES_BS_DEPTH == 192) || \$ WARNING: please, no spaces at the start of a line #51: FILE: john_core/src/DES_bs_b.c:51: + (ARCH_BITS == 32 && DES_BS_DEPTH == 160))$ WARNING: do not add new typedefs #56: FILE: john_core/src/DES_bs_b.c:56: +typedef struct { WARNING: Missing a blank line after declarations #58: FILE: john_core/src/DES_bs_b.c:58: + vector signed int f; + unsigned ARCH_WORD g; ERROR: Macros with multiple statements should be enclosed in a do - while loop #61: FILE: john_core/src/DES_bs_b.c:61: +#define vst(dst, ofs, src) \ + vec_st((src).f, (ofs) * sizeof(DES_bs_vector), ((vtype *)&(dst))->f); \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g WARNING: do not add new typedefs #90: FILE: john_core/src/DES_bs_b.c:90: +typedef struct { ERROR: Macros with multiple statements should be enclosed in a do - while loop #94: FILE: john_core/src/DES_bs_b.c:94: +#define vst(dst, ofs, src) \ + vec_st((src).f, (ofs) * sizeof(DES_bs_vector), ((vtype *)&(dst))->f); \ + vec_st((src).g, (ofs) * sizeof(DES_bs_vector), ((vtype *)&(dst))->g) WARNING: do not add new typedefs #122: FILE: john_core/src/DES_bs_b.c:122: +typedef __m256 vtype; ERROR: Macros with complex values should be enclosed in parentheses #130: FILE: john_core/src/DES_bs_b.c:130: +#define vand(dst, a, b) \ + (dst) = _mm256_and_ps((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #132: FILE: john_core/src/DES_bs_b.c:132: +#define vor(dst, a, b) \ + (dst) = _mm256_or_ps((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #134: FILE: john_core/src/DES_bs_b.c:134: +#define vandn(dst, a, b) \ + (dst) = _mm256_andnot_ps((b), (a)) ERROR: Macros with complex values should be enclosed in parentheses #139: FILE: john_core/src/DES_bs_b.c:139: +#define vsel(dst, a, b, c) \ + (dst) = __builtin_ia32_vpcmov_v8sf256((b), (a), (c)) ERROR: Macros with multiple statements should be enclosed in a do - while loop #148: FILE: john_core/src/DES_bs_b.c:148: +#define vshl(dst, src, shift) \ + ((__m128i *)&(dst))[0] = \ + _mm_slli_epi64(((__m128i *)&(src))[0], (shift)); \ + ((__m128i *)&(dst))[1] = \ + _mm_slli_epi64(((__m128i *)&(src))[1], (shift)) ERROR: Macros with multiple statements should be enclosed in a do - while loop #153: FILE: john_core/src/DES_bs_b.c:153: +#define vshr(dst, src, shift) \ + ((__m128i *)&(dst))[0] = \ + _mm_srli_epi64(((__m128i *)&(src))[0], (shift)); \ + ((__m128i *)&(dst))[1] = \ + _mm_srli_epi64(((__m128i *)&(src))[1], (shift)) WARNING: do not add new typedefs #165: FILE: john_core/src/DES_bs_b.c:165: +typedef struct { ERROR: Macros with multiple statements should be enclosed in a do - while loop #171: FILE: john_core/src/DES_bs_b.c:171: +#define vst(dst, ofs, src) \ + _mm256_store_ps( \ + (float *)&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + _mm_store_si128(&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g, \ + (src).g) WARNING: do not add new typedefs #215: FILE: john_core/src/DES_bs_b.c:215: +typedef struct { ERROR: Macros with multiple statements should be enclosed in a do - while loop #220: FILE: john_core/src/DES_bs_b.c:220: +#define vst(dst, ofs, src) \ + _mm256_store_ps( \ + (float *)&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + _mm256_store_ps( \ + (float *)&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g, \ + (src).g) ERROR: Macros with multiple statements should be enclosed in a do - while loop #249: FILE: john_core/src/DES_bs_b.c:249: +#define vshl(dst, src, shift) \ + ((__m128i *)&(dst).f)[0] = \ + _mm_slli_epi64(((__m128i *)&(src).f)[0], (shift)); \ + ((__m128i *)&(dst).f)[1] = \ + _mm_slli_epi64(((__m128i *)&(src).f)[1], (shift)); \ + ((__m128i *)&(dst).g)[0] = \ + _mm_slli_epi64(((__m128i *)&(src).g)[0], (shift)); \ + ((__m128i *)&(dst).g)[1] = \ + _mm_slli_epi64(((__m128i *)&(src).g)[1], (shift)) ERROR: Macros with multiple statements should be enclosed in a do - while loop #258: FILE: john_core/src/DES_bs_b.c:258: +#define vshr(dst, src, shift) \ + ((__m128i *)&(dst).f)[0] = \ + _mm_srli_epi64(((__m128i *)&(src).f)[0], (shift)); \ + ((__m128i *)&(dst).f)[1] = \ + _mm_srli_epi64(((__m128i *)&(src).f)[1], (shift)); \ + ((__m128i *)&(dst).g)[0] = \ + _mm_srli_epi64(((__m128i *)&(src).g)[0], (shift)); \ + ((__m128i *)&(dst).g)[1] = \ + _mm_srli_epi64(((__m128i *)&(src).g)[1], (shift)) WARNING: please, no spaces at the start of a line #269: FILE: john_core/src/DES_bs_b.c:269: + !defined(DES_BS_NO_MMX)$ WARNING: do not add new typedefs #273: FILE: john_core/src/DES_bs_b.c:273: +typedef struct { ERROR: Macros with multiple statements should be enclosed in a do - while loop #279: FILE: john_core/src/DES_bs_b.c:279: +#define vst(dst, ofs, src) \ + _mm256_store_ps( \ + (float *)&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g WARNING: please, no spaces at the start of a line #313: FILE: john_core/src/DES_bs_b.c:313: + ((ARCH_BITS == 64 && DES_BS_DEPTH == 320) || \$ WARNING: please, no spaces at the start of a line #314: FILE: john_core/src/DES_bs_b.c:314: + (ARCH_BITS == 32 && DES_BS_DEPTH == 288))$ WARNING: do not add new typedefs #318: FILE: john_core/src/DES_bs_b.c:318: +typedef struct { WARNING: Missing a blank line after declarations #321: FILE: john_core/src/DES_bs_b.c:321: + __m256 f; + unsigned ARCH_WORD g; ERROR: Macros with multiple statements should be enclosed in a do - while loop #324: FILE: john_core/src/DES_bs_b.c:324: +#define vst(dst, ofs, src) \ + _mm256_store_ps( \ + (float *)&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g WARNING: please, no spaces at the start of a line #361: FILE: john_core/src/DES_bs_b.c:361: + ((ARCH_BITS == 64 && DES_BS_DEPTH == 384) || \$ WARNING: please, no spaces at the start of a line #362: FILE: john_core/src/DES_bs_b.c:362: + (ARCH_BITS == 32 && DES_BS_DEPTH == 352))$ WARNING: do not add new typedefs #366: FILE: john_core/src/DES_bs_b.c:366: +typedef struct { WARNING: Missing a blank line after declarations #370: FILE: john_core/src/DES_bs_b.c:370: + __m64 g; + unsigned ARCH_WORD h; ERROR: Macros with multiple statements should be enclosed in a do - while loop #373: FILE: john_core/src/DES_bs_b.c:373: +#define vst(dst, ofs, src) \ + _mm256_store_ps( \ + (float *)&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g; \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->h = (src).h WARNING: do not add new typedefs #427: FILE: john_core/src/DES_bs_b.c:427: +typedef __m128i vtype; ERROR: Macros with complex values should be enclosed in parentheses #435: FILE: john_core/src/DES_bs_b.c:435: +#define vand(dst, a, b) \ + (dst) = _mm_and_si128((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #437: FILE: john_core/src/DES_bs_b.c:437: +#define vor(dst, a, b) \ + (dst) = _mm_or_si128((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #439: FILE: john_core/src/DES_bs_b.c:439: +#define vandn(dst, a, b) \ + (dst) = _mm_andnot_si128((b), (a)) ERROR: Macros with complex values should be enclosed in parentheses #443: FILE: john_core/src/DES_bs_b.c:443: +#define vsel(dst, a, b, c) \ + (dst) = _mm_cmov_si128((b), (a), (c)) ERROR: Macros with complex values should be enclosed in parentheses #446: FILE: john_core/src/DES_bs_b.c:446: +#define vsel(dst, a, b, c) \ + (dst) = _mm_xor_si128(_mm_andnot_si128((c), (a)), \ + _mm_and_si128((c), (b))) ERROR: Macros with complex values should be enclosed in parentheses #451: FILE: john_core/src/DES_bs_b.c:451: +#define vshl1(dst, src) \ + (dst) = _mm_add_epi8((src), (src)) ERROR: Macros with complex values should be enclosed in parentheses #453: FILE: john_core/src/DES_bs_b.c:453: +#define vshl(dst, src, shift) \ + (dst) = _mm_slli_epi64((src), (shift)) ERROR: Macros with complex values should be enclosed in parentheses #455: FILE: john_core/src/DES_bs_b.c:455: +#define vshr(dst, src, shift) \ + (dst) = _mm_srli_epi64((src), (shift)) WARNING: do not add new typedefs #468: FILE: john_core/src/DES_bs_b.c:468: +typedef struct { ERROR: Macros with multiple statements should be enclosed in a do - while loop #472: FILE: john_core/src/DES_bs_b.c:472: +#define vst(dst, ofs, src) \ + _mm_store_si128(&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + _mm_store_si128(&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g, \ + (src).g) WARNING: please, no spaces at the start of a line #509: FILE: john_core/src/DES_bs_b.c:509: + !defined(DES_BS_NO_MMX)$ WARNING: do not add new typedefs #513: FILE: john_core/src/DES_bs_b.c:513: +typedef struct { ERROR: Macros with multiple statements should be enclosed in a do - while loop #518: FILE: john_core/src/DES_bs_b.c:518: +#define vst(dst, ofs, src) \ + _mm_store_si128(&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g WARNING: please, no spaces at the start of a line #548: FILE: john_core/src/DES_bs_b.c:548: + ((ARCH_BITS == 64 && DES_BS_DEPTH == 192) || \$ WARNING: please, no spaces at the start of a line #549: FILE: john_core/src/DES_bs_b.c:549: + (ARCH_BITS == 32 && DES_BS_DEPTH == 160))$ WARNING: do not add new typedefs #552: FILE: john_core/src/DES_bs_b.c:552: +typedef struct { WARNING: Missing a blank line after declarations #554: FILE: john_core/src/DES_bs_b.c:554: + __m128i f; + unsigned ARCH_WORD g; ERROR: Macros with multiple statements should be enclosed in a do - while loop #557: FILE: john_core/src/DES_bs_b.c:557: +#define vst(dst, ofs, src) \ + _mm_store_si128(&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g WARNING: please, no spaces at the start of a line #590: FILE: john_core/src/DES_bs_b.c:590: + ((ARCH_BITS == 64 && DES_BS_DEPTH == 256) || \$ WARNING: please, no spaces at the start of a line #591: FILE: john_core/src/DES_bs_b.c:591: + (ARCH_BITS == 32 && DES_BS_DEPTH == 224))$ WARNING: do not add new typedefs #595: FILE: john_core/src/DES_bs_b.c:595: +typedef struct { WARNING: Missing a blank line after declarations #598: FILE: john_core/src/DES_bs_b.c:598: + __m64 g; + unsigned ARCH_WORD h; ERROR: Macros with multiple statements should be enclosed in a do - while loop #601: FILE: john_core/src/DES_bs_b.c:601: +#define vst(dst, ofs, src) \ + _mm_store_si128(&((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f, \ + (src).f); \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g; \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->h = (src).h WARNING: do not add new typedefs #645: FILE: john_core/src/DES_bs_b.c:645: +typedef __m64 vtype; ERROR: Macros with complex values should be enclosed in parentheses #650: FILE: john_core/src/DES_bs_b.c:650: +#define vand(dst, a, b) \ + (dst) = _mm_and_si64((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #652: FILE: john_core/src/DES_bs_b.c:652: +#define vor(dst, a, b) \ + (dst) = _mm_or_si64((a), (b)) ERROR: Macros with complex values should be enclosed in parentheses #654: FILE: john_core/src/DES_bs_b.c:654: +#define vandn(dst, a, b) \ + (dst) = _mm_andnot_si64((b), (a)) ERROR: Macros with complex values should be enclosed in parentheses #657: FILE: john_core/src/DES_bs_b.c:657: +#define vshl1(dst, src) \ + (dst) = _mm_add_pi8((src), (src)) ERROR: Macros with complex values should be enclosed in parentheses #659: FILE: john_core/src/DES_bs_b.c:659: +#define vshl(dst, src, shift) \ + (dst) = _mm_slli_si64((src), (shift)) ERROR: Macros with complex values should be enclosed in parentheses #661: FILE: john_core/src/DES_bs_b.c:661: +#define vshr(dst, src, shift) \ + (dst) = _mm_srli_si64((src), (shift)) WARNING: do not add new typedefs #667: FILE: john_core/src/DES_bs_b.c:667: +typedef struct { WARNING: Missing a blank line after declarations #669: FILE: john_core/src/DES_bs_b.c:669: + __m64 f; + unsigned ARCH_WORD g; ERROR: Macros with multiple statements should be enclosed in a do - while loop #672: FILE: john_core/src/DES_bs_b.c:672: +#define vst(dst, ofs, src) \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->f = (src).f; \ + ((vtype *)((DES_bs_vector *)&(dst) + (ofs)))->g = (src).g WARNING: do not add new typedefs #710: FILE: john_core/src/DES_bs_b.c:710: +typedef unsigned ARCH_WORD vtype; ERROR: Macros with complex values should be enclosed in parentheses #715: FILE: john_core/src/DES_bs_b.c:715: +#define vnot(dst, a) \ + (dst) = ~(a) ERROR: Macros with complex values should be enclosed in parentheses #717: FILE: john_core/src/DES_bs_b.c:717: +#define vand(dst, a, b) \ + (dst) = (a) & (b) ERROR: Macros with complex values should be enclosed in parentheses #719: FILE: john_core/src/DES_bs_b.c:719: +#define vor(dst, a, b) \ + (dst) = (a) | (b) ERROR: Macros with complex values should be enclosed in parentheses #721: FILE: john_core/src/DES_bs_b.c:721: +#define vandn(dst, a, b) \ + (dst) = (a) & ~(b) ERROR: Macros with complex values should be enclosed in parentheses #723: FILE: john_core/src/DES_bs_b.c:723: +#define vsel(dst, a, b, c) \ + (dst) = (((a) & ~(c)) ^ ((b) & (c))) ERROR: Macros with complex values should be enclosed in parentheses #726: FILE: john_core/src/DES_bs_b.c:726: +#define vshl(dst, src, shift) \ + (dst) = (src) << (shift) ERROR: Macros with complex values should be enclosed in parentheses #728: FILE: john_core/src/DES_bs_b.c:728: +#define vshr(dst, src, shift) \ + (dst) = (src) >> (shift) ERROR: Macros with complex values should be enclosed in parentheses #744: FILE: john_core/src/DES_bs_b.c:744: +#define vst(dst, ofs, src) \ + *((vtype *)((DES_bs_vector *)&(dst) + (ofs))) = (src) ERROR: Macros with complex values should be enclosed in parentheses #749: FILE: john_core/src/DES_bs_b.c:749: +#define vxor(dst, a, b) \ + (dst) = vxorf((a), (b)) ERROR: space prohibited before open square bracket '[' #785: FILE: john_core/src/DES_bs_b.c:785: +#define DEPTH_K [depth] WARNING: do not add new typedefs #792: FILE: john_core/src/DES_bs_b.c:792: +typedef unsigned ARCH_WORD kvtype; ERROR: Macros with complex values should be enclosed in parentheses #793: FILE: john_core/src/DES_bs_b.c:793: +#define kvand(dst, a, b) \ + (dst) = (a) & (b) ERROR: Macros with complex values should be enclosed in parentheses #795: FILE: john_core/src/DES_bs_b.c:795: +#define kvor(dst, a, b) \ + (dst) = (a) | (b) ERROR: Macros with complex values should be enclosed in parentheses #797: FILE: john_core/src/DES_bs_b.c:797: +#define kvshl1(dst, src) \ + (dst) = (src) << 1 ERROR: Macros with complex values should be enclosed in parentheses #799: FILE: john_core/src/DES_bs_b.c:799: +#define kvshl(dst, src, shift) \ + (dst) = (src) << (shift) ERROR: Macros with complex values should be enclosed in parentheses #801: FILE: john_core/src/DES_bs_b.c:801: +#define kvshr(dst, src, shift) \ + (dst) = (src) >> (shift) WARNING: macros should not use a trailing semicolon #837: FILE: john_core/src/DES_bs_b.c:837: +#define LOAD_V \ + kvtype v0 = *(kvtype *)&vp[0]; \ + kvtype v4 = *(kvtype *)&vp[4]; ERROR: Macros with complex values should be enclosed in parentheses #840: FILE: john_core/src/DES_bs_b.c:840: +#define v1 *(kvtype *)&vp[1] ERROR: Macros with complex values should be enclosed in parentheses #841: FILE: john_core/src/DES_bs_b.c:841: +#define v2 *(kvtype *)&vp[2] ERROR: Macros with complex values should be enclosed in parentheses #842: FILE: john_core/src/DES_bs_b.c:842: +#define v3 *(kvtype *)&vp[3] ERROR: Macros with complex values should be enclosed in parentheses #843: FILE: john_core/src/DES_bs_b.c:843: +#define v5 *(kvtype *)&vp[5] ERROR: Macros with complex values should be enclosed in parentheses #844: FILE: john_core/src/DES_bs_b.c:844: +#define v6 *(kvtype *)&vp[6] ERROR: Macros with complex values should be enclosed in parentheses #845: FILE: john_core/src/DES_bs_b.c:845: +#define v7 *(kvtype *)&vp[7] WARNING: macros should not use a trailing semicolon #847: FILE: john_core/src/DES_bs_b.c:847: +#define LOAD_V \ + kvtype v0 = *(kvtype *)&vp[0]; \ + kvtype v1 = *(kvtype *)&vp[1]; \ + kvtype v2 = *(kvtype *)&vp[2]; \ + kvtype v3 = *(kvtype *)&vp[3]; \ + kvtype v4 = *(kvtype *)&vp[4]; \ + kvtype v5 = *(kvtype *)&vp[5]; \ + kvtype v6 = *(kvtype *)&vp[6]; \ + kvtype v7 = *(kvtype *)&vp[7]; ERROR: Macros with multiple statements should be enclosed in a do - while loop #858: FILE: john_core/src/DES_bs_b.c:858: +#define kvand_shl1_or(dst, src, mask) \ + kvand(tmp, src, mask); \ + kvshl1(tmp, tmp); \ + kvor(dst, dst, tmp) ERROR: Macros with multiple statements should be enclosed in a do - while loop #863: FILE: john_core/src/DES_bs_b.c:863: +#define kvand_shl_or(dst, src, mask, shift) \ + kvand(tmp, src, mask); \ + kvshl(tmp, tmp, shift); \ + kvor(dst, dst, tmp) ERROR: Macros with multiple statements should be enclosed in a do - while loop #868: FILE: john_core/src/DES_bs_b.c:868: +#define kvand_shl1(dst, src, mask) \ + kvand(tmp, src, mask); \ + kvshl1(dst, tmp) ERROR: Macros with multiple statements should be enclosed in a do - while loop #872: FILE: john_core/src/DES_bs_b.c:872: +#define kvand_or(dst, src, mask) \ + kvand(tmp, src, mask); \ + kvor(dst, dst, tmp) ERROR: Macros with multiple statements should be enclosed in a do - while loop #876: FILE: john_core/src/DES_bs_b.c:876: +#define kvand_shr_or(dst, src, mask, shift) \ + kvand(tmp, src, mask); \ + kvshr(tmp, tmp, shift); \ + kvor(dst, dst, tmp) ERROR: Macros with multiple statements should be enclosed in a do - while loop #881: FILE: john_core/src/DES_bs_b.c:881: +#define kvand_shr(dst, src, mask, shift) \ + kvand(tmp, src, mask); \ + kvshr(dst, tmp, shift) WARNING: Missing a blank line after declarations #1010: FILE: john_core/src/DES_bs_b.c:1010: + int ic; + for (ic = 0; ic < 8; ic++) { WARNING: Missing a blank line after declarations #1027: FILE: john_core/src/DES_bs_b.c:1027: + int index; + for (index = 0; index < 0x300; index++) WARNING: suspect code indent for conditional statements (16, 16) #1027: FILE: john_core/src/DES_bs_b.c:1027: + for (index = 0; index < 0x300; index++) + for_each_depth_k() { WARNING: Missing a blank line after declarations #1060: FILE: john_core/src/DES_bs_b.c:1060: + int src2 = dst + 24; + if (new & 1) { ERROR: space prohibited before open square bracket '[' #1094: FILE: john_core/src/DES_bs_b.c:1094: +#define kd [depth] ERROR: space prohibited before open square bracket '[' #1095: FILE: john_core/src/DES_bs_b.c:1095: +#define bd [depth] ERROR: space prohibited before open square bracket '[' #1096: FILE: john_core/src/DES_bs_b.c:1096: +#define ed [depth] ERROR: space prohibited before open square bracket '[' #1097: FILE: john_core/src/DES_bs_b.c:1097: +#define DEPTH [depth] ERROR: space prohibited before open square bracket '[' #1104: FILE: john_core/src/DES_bs_b.c:1104: +#define kd [0] ERROR: space prohibited before open square bracket '[' #1107: FILE: john_core/src/DES_bs_b.c:1107: +#define ed [0] ERROR: Macros with complex values should be enclosed in parentheses #1112: FILE: john_core/src/DES_bs_b.c:1112: +#define DES_bs_clear_block_8(i) \ + for_each_depth() { \ + vst(b[i] bd, 0, zero); \ + vst(b[i] bd, 1, zero); \ + vst(b[i] bd, 2, zero); \ + vst(b[i] bd, 3, zero); \ + vst(b[i] bd, 4, zero); \ + vst(b[i] bd, 5, zero); \ + vst(b[i] bd, 6, zero); \ + vst(b[i] bd, 7, zero); \ + } ERROR: Macros with multiple statements should be enclosed in a do - while loop #1124: FILE: john_core/src/DES_bs_b.c:1124: +#define DES_bs_clear_block \ + DES_bs_clear_block_8(0); \ + DES_bs_clear_block_8(8); \ + DES_bs_clear_block_8(16); \ + DES_bs_clear_block_8(24); \ + DES_bs_clear_block_8(32); \ + DES_bs_clear_block_8(40); \ + DES_bs_clear_block_8(48); \ + DES_bs_clear_block_8(56); WARNING: macros should not use a trailing semicolon #1124: FILE: john_core/src/DES_bs_b.c:1124: +#define DES_bs_clear_block \ + DES_bs_clear_block_8(0); \ + DES_bs_clear_block_8(8); \ + DES_bs_clear_block_8(16); \ + DES_bs_clear_block_8(24); \ + DES_bs_clear_block_8(32); \ + DES_bs_clear_block_8(40); \ + DES_bs_clear_block_8(48); \ + DES_bs_clear_block_8(56); ERROR: Macros with complex values should be enclosed in parentheses #1134: FILE: john_core/src/DES_bs_b.c:1134: +#define DES_bs_set_block_8(i, v0, v1, v2, v3, v4, v5, v6, v7) \ + for_each_depth() { \ + vst(b[i] bd, 0, v0); \ + vst(b[i] bd, 1, v1); \ + vst(b[i] bd, 2, v2); \ + vst(b[i] bd, 3, v3); \ + vst(b[i] bd, 4, v4); \ + vst(b[i] bd, 5, v5); \ + vst(b[i] bd, 6, v6); \ + vst(b[i] bd, 7, v7); \ + } WARNING: line over 80 characters #1157: FILE: john_core/src/DES_bs_b.c:1157: +#pragma omp parallel for default(none) private(t) shared(n, DES_bs_all_p, keys_count) WARNING: Missing a blank line after declarations #1180: FILE: john_core/src/DES_bs_b.c:1180: + vtype zero = vzero; + DES_bs_clear_block WARNING: suspect code indent for conditional statements (16, 16) #1192: FILE: john_core/src/DES_bs_b.c:1192: + for_each_depth() + s1(x(0), x(1), x(2), x(3), x(4), x(5), WARNING: suspect code indent for conditional statements (16, 16) #1195: FILE: john_core/src/DES_bs_b.c:1195: + for_each_depth() + s2(x(6), x(7), x(8), x(9), x(10), x(11), WARNING: suspect code indent for conditional statements (16, 16) #1198: FILE: john_core/src/DES_bs_b.c:1198: + for_each_depth() + s3(y(7, 12), y(8, 13), y(9, 14), WARNING: suspect code indent for conditional statements (16, 16) #1202: FILE: john_core/src/DES_bs_b.c:1202: + for_each_depth() + s4(y(11, 18), y(12, 19), y(13, 20), WARNING: suspect code indent for conditional statements (16, 16) #1206: FILE: john_core/src/DES_bs_b.c:1206: + for_each_depth() + s5(x(24), x(25), x(26), x(27), x(28), x(29), WARNING: suspect code indent for conditional statements (16, 16) #1209: FILE: john_core/src/DES_bs_b.c:1209: + for_each_depth() + s6(x(30), x(31), x(32), x(33), x(34), x(35), WARNING: suspect code indent for conditional statements (16, 16) #1212: FILE: john_core/src/DES_bs_b.c:1212: + for_each_depth() + s7(y(23, 36), y(24, 37), y(25, 38), WARNING: suspect code indent for conditional statements (16, 16) #1216: FILE: john_core/src/DES_bs_b.c:1216: + for_each_depth() + s8(y(27, 42), y(28, 43), y(29, 44), ERROR: trailing statements should be on next line #1221: FILE: john_core/src/DES_bs_b.c:1221: + if (rounds_and_swapped == 0x100) goto next; WARNING: suspect code indent for conditional statements (16, 16) #1224: FILE: john_core/src/DES_bs_b.c:1224: + for_each_depth() + s1(x(48), x(49), x(50), x(51), x(52), x(53), WARNING: suspect code indent for conditional statements (16, 16) #1227: FILE: john_core/src/DES_bs_b.c:1227: + for_each_depth() + s2(x(54), x(55), x(56), x(57), x(58), x(59), WARNING: suspect code indent for conditional statements (16, 16) #1230: FILE: john_core/src/DES_bs_b.c:1230: + for_each_depth() + s3(y(39, 60), y(40, 61), y(41, 62), WARNING: suspect code indent for conditional statements (16, 16) #1234: FILE: john_core/src/DES_bs_b.c:1234: + for_each_depth() + s4(y(43, 66), y(44, 67), y(45, 68), WARNING: suspect code indent for conditional statements (16, 16) #1238: FILE: john_core/src/DES_bs_b.c:1238: + for_each_depth() + s5(x(72), x(73), x(74), x(75), x(76), x(77), WARNING: suspect code indent for conditional statements (16, 16) #1241: FILE: john_core/src/DES_bs_b.c:1241: + for_each_depth() + s6(x(78), x(79), x(80), x(81), x(82), x(83), WARNING: suspect code indent for conditional statements (16, 16) #1244: FILE: john_core/src/DES_bs_b.c:1244: + for_each_depth() + s7(y(55, 84), y(56, 85), y(57, 86), WARNING: suspect code indent for conditional statements (16, 16) #1248: FILE: john_core/src/DES_bs_b.c:1248: + for_each_depth() + s8(y(59, 90), y(60, 91), y(61, 92), ERROR: trailing statements should be on next line #1255: FILE: john_core/src/DES_bs_b.c:1255: + if (--rounds_and_swapped) goto start; ERROR: trailing statements should be on next line #1258: FILE: john_core/src/DES_bs_b.c:1258: + if (--iterations) goto swap; WARNING: line over 80 characters #1289: FILE: john_core/src/DES_bs_b.c:1289: +#pragma omp parallel for default(none) private(t) shared(n, DES_bs_all_p, count, keys_count) WARNING: Missing a blank line after declarations #1312: FILE: john_core/src/DES_bs_b.c:1312: + vtype zero = vzero; + DES_bs_clear_block WARNING: suspect code indent for conditional statements (16, 16) #1324: FILE: john_core/src/DES_bs_b.c:1324: + for_each_depth() + s1(x(0), x(1), x(2), x(3), x(4), x(5), WARNING: suspect code indent for conditional statements (16, 16) #1327: FILE: john_core/src/DES_bs_b.c:1327: + for_each_depth() + s2(x(6), x(7), x(8), x(9), x(10), x(11), WARNING: suspect code indent for conditional statements (16, 16) #1330: FILE: john_core/src/DES_bs_b.c:1330: + for_each_depth() + s3(x(12), x(13), x(14), x(15), x(16), x(17), WARNING: suspect code indent for conditional statements (16, 16) #1333: FILE: john_core/src/DES_bs_b.c:1333: + for_each_depth() + s4(x(18), x(19), x(20), x(21), x(22), x(23), WARNING: suspect code indent for conditional statements (16, 16) #1336: FILE: john_core/src/DES_bs_b.c:1336: + for_each_depth() + s5(x(24), x(25), x(26), x(27), x(28), x(29), WARNING: suspect code indent for conditional statements (16, 16) #1339: FILE: john_core/src/DES_bs_b.c:1339: + for_each_depth() + s6(x(30), x(31), x(32), x(33), x(34), x(35), WARNING: suspect code indent for conditional statements (16, 16) #1342: FILE: john_core/src/DES_bs_b.c:1342: + for_each_depth() + s7(x(36), x(37), x(38), x(39), x(40), x(41), WARNING: suspect code indent for conditional statements (16, 16) #1345: FILE: john_core/src/DES_bs_b.c:1345: + for_each_depth() + s8(x(42), x(43), x(44), x(45), x(46), x(47), ERROR: trailing statements should be on next line #1349: FILE: john_core/src/DES_bs_b.c:1349: + if (rounds_and_swapped == 0x100) goto next; WARNING: suspect code indent for conditional statements (16, 16) #1352: FILE: john_core/src/DES_bs_b.c:1352: + for_each_depth() + s1(x(48), x(49), x(50), x(51), x(52), x(53), WARNING: suspect code indent for conditional statements (16, 16) #1355: FILE: john_core/src/DES_bs_b.c:1355: + for_each_depth() + s2(x(54), x(55), x(56), x(57), x(58), x(59), WARNING: suspect code indent for conditional statements (16, 16) #1358: FILE: john_core/src/DES_bs_b.c:1358: + for_each_depth() + s3(x(60), x(61), x(62), x(63), x(64), x(65), WARNING: suspect code indent for conditional statements (16, 16) #1361: FILE: john_core/src/DES_bs_b.c:1361: + for_each_depth() + s4(x(66), x(67), x(68), x(69), x(70), x(71), WARNING: suspect code indent for conditional statements (16, 16) #1364: FILE: john_core/src/DES_bs_b.c:1364: + for_each_depth() + s5(x(72), x(73), x(74), x(75), x(76), x(77), WARNING: suspect code indent for conditional statements (16, 16) #1367: FILE: john_core/src/DES_bs_b.c:1367: + for_each_depth() + s6(x(78), x(79), x(80), x(81), x(82), x(83), WARNING: suspect code indent for conditional statements (16, 16) #1370: FILE: john_core/src/DES_bs_b.c:1370: + for_each_depth() + s7(x(84), x(85), x(86), x(87), x(88), x(89), WARNING: suspect code indent for conditional statements (16, 16) #1373: FILE: john_core/src/DES_bs_b.c:1373: + for_each_depth() + s8(x(90), x(91), x(92), x(93), x(94), x(95), ERROR: trailing statements should be on next line #1379: FILE: john_core/src/DES_bs_b.c:1379: + if (--rounds_and_swapped) goto start; ERROR: trailing statements should be on next line #1382: FILE: john_core/src/DES_bs_b.c:1382: + if (--iterations) goto swap; ERROR: trailing statements should be on next line #1392: FILE: john_core/src/DES_bs_b.c:1392: + if (--iterations) goto start; WARNING: Missing a blank line after declarations #1425: FILE: john_core/src/DES_bs_b.c:1425: + int ic; + for (ic = 0; ic < 7; ic++) { ERROR: space prohibited before open square bracket '[' #1450: FILE: john_core/src/DES_bs_b.c:1450: +#define kd [depth] ERROR: space prohibited before open square bracket '[' #1452: FILE: john_core/src/DES_bs_b.c:1452: +#define kd [0] WARNING: line over 80 characters #1463: FILE: john_core/src/DES_bs_b.c:1463: +#pragma omp parallel for default(none) private(t) shared(n, DES_bs_all_p, keys_count) WARNING: Missing a blank line after declarations #1474: FILE: john_core/src/DES_bs_b.c:1474: + vtype z = vzero, o = vones; + DES_bs_set_block_8(0, z, z, z, z, z, z, z, z); WARNING: suspect code indent for conditional statements (24, 24) #1494: FILE: john_core/src/DES_bs_b.c:1494: + for_each_depth() + s1(y(31, 0), y(0, 1), y(1, 2), WARNING: suspect code indent for conditional statements (24, 24) #1498: FILE: john_core/src/DES_bs_b.c:1498: + for_each_depth() + s2(y(3, 6), y(4, 7), y(5, 8), WARNING: suspect code indent for conditional statements (24, 24) #1502: FILE: john_core/src/DES_bs_b.c:1502: + for_each_depth() + s3(y(7, 12), y(8, 13), y(9, 14), WARNING: suspect code indent for conditional statements (24, 24) #1506: FILE: john_core/src/DES_bs_b.c:1506: + for_each_depth() + s4(y(11, 18), y(12, 19), y(13, 20), WARNING: suspect code indent for conditional statements (24, 24) #1510: FILE: john_core/src/DES_bs_b.c:1510: + for_each_depth() + s5(y(15, 24), y(16, 25), y(17, 26), WARNING: suspect code indent for conditional statements (24, 24) #1514: FILE: john_core/src/DES_bs_b.c:1514: + for_each_depth() + s6(y(19, 30), y(20, 31), y(21, 32), WARNING: suspect code indent for conditional statements (24, 24) #1518: FILE: john_core/src/DES_bs_b.c:1518: + for_each_depth() + s7(y(23, 36), y(24, 37), y(25, 38), WARNING: suspect code indent for conditional statements (24, 24) #1522: FILE: john_core/src/DES_bs_b.c:1522: + for_each_depth() + s8(y(27, 42), y(28, 43), y(29, 44), WARNING: suspect code indent for conditional statements (24, 24) #1527: FILE: john_core/src/DES_bs_b.c:1527: + for_each_depth() + s1(y(63, 48), y(32, 49), y(33, 50), WARNING: suspect code indent for conditional statements (24, 24) #1531: FILE: john_core/src/DES_bs_b.c:1531: + for_each_depth() + s2(y(35, 54), y(36, 55), y(37, 56), WARNING: suspect code indent for conditional statements (24, 24) #1535: FILE: john_core/src/DES_bs_b.c:1535: + for_each_depth() + s3(y(39, 60), y(40, 61), y(41, 62), WARNING: suspect code indent for conditional statements (24, 24) #1539: FILE: john_core/src/DES_bs_b.c:1539: + for_each_depth() + s4(y(43, 66), y(44, 67), y(45, 68), WARNING: suspect code indent for conditional statements (24, 24) #1543: FILE: john_core/src/DES_bs_b.c:1543: + for_each_depth() + s5(y(47, 72), y(48, 73), y(49, 74), WARNING: suspect code indent for conditional statements (24, 24) #1547: FILE: john_core/src/DES_bs_b.c:1547: + for_each_depth() + s6(y(51, 78), y(52, 79), y(53, 80), WARNING: suspect code indent for conditional statements (24, 24) #1551: FILE: john_core/src/DES_bs_b.c:1551: + for_each_depth() + s7(y(55, 84), y(56, 85), y(57, 86), WARNING: suspect code indent for conditional statements (24, 24) #1555: FILE: john_core/src/DES_bs_b.c:1555: + for_each_depth() + s8(y(59, 90), y(60, 91), y(61, 92), total: 84 errors, 99 warnings, 1566 lines checked john_core/src/DES_bs_b.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: space prohibited before open square bracket '[' #14: FILE: john_core/src/DES_bs.c:14: +#define DEPTH [depth] ERROR: space prohibited before open square bracket '[' #15: FILE: john_core/src/DES_bs.c:15: +#define START [0] ERROR: Macros with multiple statements should be enclosed in a do - while loop #16: FILE: john_core/src/DES_bs.c:16: +#define init_depth() \ + depth = index >> ARCH_BITS_LOG; \ + index &= (ARCH_BITS - 1); WARNING: macros should not use a trailing semicolon #16: FILE: john_core/src/DES_bs.c:16: +#define init_depth() \ + depth = index >> ARCH_BITS_LOG; \ + index &= (ARCH_BITS - 1); WARNING: externs should be avoided in .c files #55: FILE: john_core/src/DES_bs.c:55: +extern void DES_bs_init_asm(void); WARNING: Missing a blank line after declarations #83: FILE: john_core/src/DES_bs.c:83: + int max = n * cpt; + while (max > DES_bs_mt_max) ERROR: trailing statements should be on next line #114: FILE: john_core/src/DES_bs.c:114: + while (p >= 28) p -= 28; ERROR: trailing statements should be on next line #119: FILE: john_core/src/DES_bs.c:119: + if (LM) bit = DES_LM_KP[bit]; WARNING: suspect code indent for conditional statements (24, 24) #133: FILE: john_core/src/DES_bs.c:133: + for (c = 0; c < 0x100; c++) + if (c >= 'a' && c <= 'z') ERROR: trailing statements should be on next line #188: FILE: john_core/src/DES_bs.c:188: + if (!key[0]) goto fill8; ERROR: trailing statements should be on next line #192: FILE: john_core/src/DES_bs.c:192: + if (!key[1]) goto fill6; ERROR: trailing statements should be on next line #193: FILE: john_core/src/DES_bs.c:193: + if (!key[2]) goto fill5; ERROR: trailing statements should be on next line #196: FILE: john_core/src/DES_bs.c:196: + if (!key[3]) goto fill4; ERROR: trailing statements should be on next line #197: FILE: john_core/src/DES_bs.c:197: + if (!key[4] || !key[5]) goto fill3; ERROR: trailing statements should be on next line #199: FILE: john_core/src/DES_bs.c:199: + if (!key[6]) goto fill2; ERROR: trailing statements should be on next line #233: FILE: john_core/src/DES_bs.c:233: + if (!c) goto fill7; ERROR: trailing statements should be on next line #236: FILE: john_core/src/DES_bs.c:236: + if (!c) goto fill6; ERROR: trailing statements should be on next line #239: FILE: john_core/src/DES_bs.c:239: + if (!c) goto fill5; ERROR: trailing statements should be on next line #242: FILE: john_core/src/DES_bs.c:242: + if (!c) goto fill4; ERROR: trailing statements should be on next line #245: FILE: john_core/src/DES_bs.c:245: + if (!c) goto fill3; ERROR: trailing statements should be on next line #248: FILE: john_core/src/DES_bs.c:248: + if (!c) goto fill2; ERROR: trailing statements should be on next line #364: FILE: john_core/src/DES_bs.c:364: + if (count == 4) return result; ERROR: trailing statements should be on next line #371: FILE: john_core/src/DES_bs.c:371: + if (count == 8) return result; ERROR: trailing statements should be on next line #377: FILE: john_core/src/DES_bs.c:377: + if (count == 12) return result; ERROR: trailing statements should be on next line #384: FILE: john_core/src/DES_bs.c:384: + if (count == 16) return result; ERROR: trailing statements should be on next line #390: FILE: john_core/src/DES_bs.c:390: + if (count == 20) return result; ERROR: trailing statements should be on next line #397: FILE: john_core/src/DES_bs.c:397: + if (count == 24) return result; WARNING: suspect code indent for conditional statements (8, 8) #461: FILE: john_core/src/DES_bs.c:461: + for_each_t(n) + for_each_depth() { ERROR: trailing statements should be on next line #468: FILE: john_core/src/DES_bs.c:468: + if (mask == ~(ARCH_WORD)0) goto next_depth; ERROR: trailing statements should be on next line #471: FILE: john_core/src/DES_bs.c:471: + if (mask == ~(ARCH_WORD)0) goto next_depth; ERROR: trailing statements should be on next line #477: FILE: john_core/src/DES_bs.c:477: + if (mask == ~(ARCH_WORD)0) goto next_depth; ERROR: trailing statements should be on next line #480: FILE: john_core/src/DES_bs.c:480: + if (mask == ~(ARCH_WORD)0) goto next_depth; ERROR: Macros with multiple statements should be enclosed in a do - while loop #507: FILE: john_core/src/DES_bs.c:507: +#define CMP_BIT(bit) \ + if ((GET_BIT(bit) ^ (binary[0] >> (bit))) & 1) \ + return 0; WARNING: Macros with flow control statements should be avoided #507: FILE: john_core/src/DES_bs.c:507: +#define CMP_BIT(bit) \ + if ((GET_BIT(bit) ^ (binary[0] >> (bit))) & 1) \ + return 0; WARNING: macros should not use a trailing semicolon #507: FILE: john_core/src/DES_bs.c:507: +#define CMP_BIT(bit) \ + if ((GET_BIT(bit) ^ (binary[0] >> (bit))) & 1) \ + return 0; WARNING: Missing a blank line after declarations #521: FILE: john_core/src/DES_bs.c:521: + int bit; + for (bit = 26; bit >= 0; bit--) total: 28 errors, 8 warnings, 563 lines checked john_core/src/DES_bs.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. ERROR: trailing statements should be on next line #101: FILE: john_core/src/DES_fmt.c:101: + if (!ciphertext[0] || !ciphertext[1]) return 0; ERROR: trailing statements should be on next line #103: FILE: john_core/src/DES_fmt.c:103: + for (pos = &ciphertext[2]; atoi64[ARCH_INDEX(*pos)] != 0x7F; pos++); ERROR: trailing statements should be on next line #104: FILE: john_core/src/DES_fmt.c:104: + if (*pos && *pos != ',') return 0; ERROR: trailing statements should be on next line #106: FILE: john_core/src/DES_fmt.c:106: + if (atoi64[ARCH_INDEX(*(pos - 1))] & 3) return 0; ERROR: trailing statements should be on next line #113: FILE: john_core/src/DES_fmt.c:113: + if (atoi64[ARCH_INDEX(ciphertext[12])] & 3) return 0; WARNING: Missing a blank line after declarations #206: FILE: john_core/src/DES_fmt.c:206: + int count = *pcount; + DES_bs_crypt_25(count); WARNING: suspect code indent for conditional statements (8, 8) #294: FILE: john_core/src/DES_fmt.c:294: + for (index = 0; index < count; index++) + if (*(unsigned ARCH_WORD *)binary == WARNING: suspect code indent for conditional statements (8, 8) #315: FILE: john_core/src/DES_fmt.c:315: + for (word = 0; word < 16 / DES_SIZE; word++) + if ((unsigned ARCH_WORD)binary[word] != total: 5 errors, 3 warnings, 432 lines checked john_core/src/DES_fmt.c has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. WARNING: externs should be avoided in .c files #34: FILE: john_core/src/DES_std.c:34: +extern ARCH_WORD DES_SPE_F[8][64]; WARNING: externs should be avoided in .c files #36: FILE: john_core/src/DES_std.c:36: +extern ARCH_WORD DES_SPE_W[4][64 * 64]; WARNING: externs should be avoided in .c files #64: FILE: john_core/src/DES_std.c:64: +extern ARCH_WORD DES_SPE_F[8][64][2]; WARNING: externs should be avoided in .c files #66: FILE: john_core/src/DES_std.c:66: +extern ARCH_WORD DES_SPE_L[8][64], DES_SPE_H[8][64]; WARNING: externs should be avoided in .c files #70: FILE: john_core/src/DES_std.c:70: +extern ARCH_WORD DES_SPE_W[4][64 * 64][2]; WARNING: externs should be avoided in .c files #100: FILE: john_core/src/DES_std.c:100: +extern DES_KS DES_KS_copy; WARNING: externs should be avoided in .c files #105: FILE: john_core/src/DES_std.c:105: +extern DES_KS DES_KS_table[8][128]; WARNING: suspect code indent for conditional statements (8, 8) #330: FILE: john_core/src/DES_std.c:330: + for (box = 0; box < 8; box++) + for (index = 0; index < 64; index++) { WARNING: suspect code indent for conditional statements (8, 8) #373: FILE: john_core/src/DES_std.c:373: + for (dst1 = 0; dst1 < 8; dst1++) + for (dst2 = 0; dst2 < 6; dst2++) { ERROR: trailing statements should be on next line #377: FILE: john_core/src/DES_std.c:377: + if (src >= 32) src -= 32; else src--; WARNING: suspect code indent for conditional statements (16, 16) #383: FILE: john_core/src/DES_std.c:383: + for (value = 0; value < 16; value++) + if (value & mask) WARNING: suspect code indent for conditional statements (16, 16) #408: FILE: john_core/src/DES_std.c:408: + for (value = 0; value < 16; value++) + if (value & mask) WARNING: suspect code indent for conditional statements (8, 8) #429: FILE: john_core/src/DES_std.c:429: + for (pos = 0; pos < 8; pos++) + for (chr = 0x7F; chr >= 0; chr--) { WARNING: suspect code indent for conditional statements (24, 24) #439: FILE: john_core/src/DES_std.c:439: + for (ofs = 0; ofs < 64; ofs += 8) + for (bit = 0; bit < 6; bit++) { ERROR: trailing statements should be on next line #444: FILE: john_core/src/DES_std.c:444: + while (p >= 28) p -= 28; WARNING: suspect code indent for conditional statements (8, 8) #489: FILE: john_core/src/DES_std.c:489: + for (box = 0; box < 8; box++) + for (index = 0; index < 64; index++) { WARNING: suspect code indent for conditional statements (8, 8) #512: FILE: john_core/src/DES_std.c:512: + for (box = 0; box < 4; box++) + for (index = 0; index < 64 * 64; index++) { ERROR: Macros with multiple statements should be enclosed in a do - while loop #539: FILE: john_core/src/DES_std.c:539: +#define DES_xor1_1(ofs) \ + DES_KS_current[ofs] ^= value1[ofs]; WARNING: macros should not use a trailing semicolon #539: FILE: john_core/src/DES_std.c:539: +#define DES_xor1_1(ofs) \ + DES_KS_current[ofs] ^= value1[ofs]; ERROR: Macros with multiple statements should be enclosed in a do - while loop #541: FILE: john_core/src/DES_std.c:541: +#define DES_xor1_4(ofs) \ + DES_xor1_1(ofs); \ + DES_xor1_1(ofs + 1); \ + DES_xor1_1(ofs + 2); \ + DES_xor1_1(ofs + 3); WARNING: macros should not use a trailing semicolon #541: FILE: john_core/src/DES_std.c:541: +#define DES_xor1_4(ofs) \ + DES_xor1_1(ofs); \ + DES_xor1_1(ofs + 1); \ + DES_xor1_1(ofs + 2); \ + DES_xor1_1(ofs + 3); ERROR: Macros with multiple statements should be enclosed in a do - while loop #546: FILE: john_core/src/DES_std.c:546: +#define DES_xor1_16(ofs) \ + DES_xor1_4(ofs); \ + DES_xor1_4(ofs + 4); \ + DES_xor1_4(ofs + 8); \ + DES_xor1_4(ofs + 12); WARNING: macros should not use a trailing semicolon #546: FILE: john_core/src/DES_std.c:546: +#define DES_xor1_16(ofs) \ + DES_xor1_4(ofs); \ + DES_xor1_4(ofs + 4); \ + DES_xor1_4(ofs + 8); \ + DES_xor1_4(ofs + 12); ERROR: Macros with multiple statements should be enclosed in a do - while loop #565: FILE: john_core/src/DES_std.c:565: +#define DES_xor2_1(ofs) \ + DES_KS_current[ofs] ^= value1[ofs] ^ value2[ofs]; WARNING: macros should not use a trailing semicolon #565: FILE: john_core/src/DES_std.c:565: +#define DES_xor2_1(ofs) \ + DES_KS_current[ofs] ^= value1[ofs] ^ value2[ofs]; ERROR: Macros with multiple statements should be enclosed in a do - while loop #567: FILE: john_core/src/DES_std.c:567: +#define DES_xor2_4(ofs) \ + DES_xor2_1(ofs); \ + DES_xor2_1(ofs + 1); \ + DES_xor2_1(ofs + 2); \ + DES_xor2_1(ofs + 3); WARNING: macros should not use a trailing semicolon #567: FILE: john_core/src/DES_std.c:567: +#define DES_xor2_4(ofs) \ + DES_xor2_1(ofs); \ + DES_xor2_1(ofs + 1); \ + DES_xor2_1(ofs + 2); \ + DES_xor2_1(ofs + 3); ERROR: Macros with multiple statements should be enclosed in a do - while loop #572: FILE: john_core/src/DES_std.c:572: +#define DES_xor2_16(ofs) \ + DES_xor2_4(ofs); \ + DES_xor2_4(ofs + 4); \ + DES_xor2_4(ofs + 8); \ + DES_xor2_4(ofs + 12); WARNING: macros should not use a trailing semicolon #572: FILE: john_core/src/DES_std.c:572: +#define DES_xor2_16(ofs) \ + DES_xor2_4(ofs); \ + DES_xor2_4(ofs + 4); \ + DES_xor2_4(ofs + 8); \ + DES_xor2_4(ofs + 12); WARNING: externs should be avoided in .c files #593: FILE: john_core/src/DES_std.c:593: +extern void DES_xor_key1(ARCH_WORD *value); WARNING: externs should be avoided in .c files #594: FILE: john_core/src/DES_std.c:594: +extern void DES_xor_key2(ARCH_WORD *value1, ARCH_WORD *value2); WARNING: suspect code indent for conditional statements (8, 8) #625: FILE: john_core/src/DES_std.c:625: + for (k = i = 0; (l = DES_key[i]) && (j = key[i]); i++) + if (j != l) k += 3;