error ===== space ----- ERROR: space prohibited after that '-' (ctx:WxW) #200: FILE: john_the_ripper/src/rar2john.c:200: + jtr_fseek64(fp, - diff, SEEK_CUR); ^ ERROR: space required one side of that '--' (ctx:WxW) #183: FILE: john_the_ripper/src/panama_plug.c:183: + while (num -- > 0) { ^ ERROR: spaces prohibited around that '->' (ctx:WxV) #450: FILE: john_the_ripper/src/opencl_DES_bs_b_plug.c:450: + num_loaded_hashes_salt[current_salt] = salt ->count; ^ ERROR: space required before the open brace '{' #110: FILE: john_the_ripper/src/keychain2john.c:110: + if(bytes != SALTLEN){ ERROR: space prohibited before that ',' (ctx:WxV) #181: FILE: john_the_ripper/src/encfs_fmt_plug.c:181: + encfs_common_streamDecode(cur_salt, tmpBuf, cur_salt->keySize + cur_salt->ivLength ,checksum, master[j]); ^ ERROR: space required before the open parenthesis '(' #131: FILE: john_the_ripper/src/7z_fmt_plug.c:131: + if(len > 16 || len < 0) /* salt length */ ERROR: exactly one space required after that #ifdef #349: FILE: john_the_ripper/src/common_opencl_pbkdf2_plug.c:349: +#ifdef _DEBUG ERROR: trailing whitespace #1: FILE: john_the_ripper/src/cryptmd5_common_plug.c:1: +/* $ ERROR: need consistent spacing around '/' (ctx:WxV) #357: FILE: john_the_ripper/src/wordlist.c:357: + fprintf (stderr, "pos="LLd" size="LLd" percent=%0.4f\n", (long long)pos, (long long)size, (100.0 * ((rule_number * (double)size) + pos) /(rule_count * (double)size))); ^ brace ----- ERROR: open brace '{' following enum go on the same line #81: FILE: john_the_ripper/src/keepass2john.c:81: +enum Kdb4HeaderFieldID +{ ERROR: while should follow close brace '}' #2942: FILE: john_the_ripper/src/dynamic_fmt.c:2942: + } + while (--w32_cnt); ERROR: that open brace { should be on the previous line #296: FILE: john_the_ripper/src/aix_ssha_fmt_plug.c:296: + for (index = 0; index < count; index += MAX_KEYS_PER_CRYPT) + { ERROR: open brace '{' following function declarations go on the next line #179: FILE: john_the_ripper/src/aix_ssha_fmt_plug.c:179: +static int valid_sha1(char *ciphertext, struct fmt_main *self) { ERROR: else should follow close brace '}' #130: FILE: john_the_ripper/src/aix_smd5_fmt_plug.c:130: + } + else { indentation ----------- ERROR: code indent should use tabs where possible #94: FILE: john_the_ripper/src/7z_fmt_plug.c:94: +^I sizeof(*saved_key));$ ERROR: switch and case should be at the same indent #132: FILE: john_the_ripper/src/base64_convert.c:132: + switch (mod) { + case 0: [...] + case 1: [...] + case 2: others ------ ERROR: "foo*bar" should be "foo *bar" #93: FILE: john_the_ripper/src/common-gpu.c:93: + void*lpBuffer = malloc(iSize); ERROR: return is not a function, parentheses are not required #323: FILE: john_the_ripper/src/citrix_ns_fmt_plug.c:323: + return (1); ERROR: Bad function definition - void setup_mime() should probably be void setup_mime(void) #701: FILE: john_the_ripper/src/base64_convert.c:701: +static void setup_mime() { ERROR: do not initialise statics to 0 or NULL #50: FILE: john_the_ripper/src/base64_convert.c:50: +static int mime_setup=0; ERROR: inline keyword should sit between storage class and type #147: FILE: john_the_ripper/src/aix_ssha_fmt_plug.c:147: +static int inline valid_common(char *ciphertext, struct fmt_main *self, int b64len, char *sig, int siglen) ERROR: Macros with complex values should be enclosed in parentheses #69: FILE: john_the_ripper/src/aix_ssha_fmt_plug.c:69: +#define CMP_SIZE BINARY_SIZE - 2 ERROR: trailing statements should be on next line #130: FILE: john_the_ripper/src/AFS_fmt.c:130: + if (strncmp(ciphertext, "$K4$", 4)) return 0; ERROR: Macros with multiple statements should be enclosed in a do - while loop #71: FILE: john_the_ripper/src/AFS_fmt.c:71: +#define AFS_swap(x, y) \ + (y) = (x); ERROR: do not use assignment in if condition #117: FILE: john_the_ripper/src/7z_fmt_plug.c:117: + if ((p = strtokm(ctcopy, "$")) == NULL) ERROR: do not use C99 // comments #51: FILE: john_the_ripper/src/7z_fmt_plug.c:51: +#define OMP_SCALE 1 // tuned on core i7 warning ======= space ----- WARNING: space prohibited between function name and open parenthesis '(' #85: FILE: john_the_ripper/src/7z_fmt_plug.c:85: +#if defined (_OPENMP) WARNING: please, no space before tabs #53: FILE: john_the_ripper/src/7z_fmt_plug.c:53: +#define BIG_ENOUGH ^I^I(8192 * 32)$ WARNING: Unnecessary space before function pointer arguments #85: FILE: john_the_ripper/src/plugin.c:85: + struct fmt_main *(*loader) (int fmt_version); WARNING: space prohibited before semicolon #108: FILE: john_the_ripper/src/BF_common_plug.c:108: + unsigned char *dptr = (unsigned char *)dst ; WARNING: please, no spaces at the start of a line #333: FILE: john_the_ripper/src/7z_fmt_plug.c:333: + SHA256_Init(&sha);$ brace ----- WARNING: else is not generally useful after a break or return #474: FILE: john_the_ripper/src/compiler.c:474: + break; + } else { WARNING: braces {} are not necessary for single statement blocks #251: FILE: john_the_ripper/src/7z_fmt_plug.c:251: + if(AES_set_decrypt_key(derived_key, 256, &akey) < 0) { + fprintf(stderr, "AES_set_decrypt_key failed in crypt!\n"); + } WARNING: type 'char unsigned' should be specified in [[un]signed] [short|int|long|long long] order #130: FILE: john_the_ripper/src/aix_ssha_fmt_plug.c:130: + char unsigned salt[MAX_SALT_SIZE + 1]; indentation ----------- WARNING: labels should not be indented #2565: FILE: john_the_ripper/src/gpg2john.c:2565: + again: WARNING: trailing semicolon indicates no statements, indent implies otherwise #1590: FILE: john_the_ripper/src/gpg2john.c:1590: + if (Getc() == 0); + // printf("No"); WARNING: suspect code indent for conditional statements (2, 4) #15: FILE: john_the_ripper/src/base64.c:15: + for(i=0; i<4; i++) { + c = in_block + i; type ---- WARNING: type 'const char unsigned *' should be specified in [[un]signed] [short|int|long|long long] order #58: FILE: john_the_ripper/src/ssh2john.c:58: + const char unsigned *dc; WARNING: static const char * array should probably be static const char * const #129: FILE: john_the_ripper/src/opencl_7z_fmt_plug.c:129: +static const char *warn[] = { WARNING: char * array declaration might be better as static const #271: FILE: john_the_ripper/src/common-opencl.c:271: + char * drivers_info[] = { others ------ WARNING: line over 80 characters #57: FILE: john_the_ripper/src/7z_fmt_plug.c:57: + {"$7z$0$19$0$1122$8$d1f50227759415890000000000000000$1412385885$112$112$5e5b8b734adf52a64c541a5a5369023d7cccb78bd910c0092535dfb013a5df84ac692c5311d2e7bbdc580f5b867f7b5dd43830f7b4f37e41c7277e228fb92a6dd854a31646ad117654182253706dae0c069d3f4ce46121d52b6f20741a0bb39fc61113ce14d22f9184adafd6b5333fb1", "password"}, WARNING: externs should be avoided in .c files #13: FILE: john_the_ripper/src/7z_fmt_plug.c:13: +extern struct fmt_main fmt_sevenzip; WARNING: Single statement macros should not use a do {} while (0) loop #320: FILE: john_the_ripper/src/ripemd_plug.c:320: +#define sRR(a, b, c, d, f, s, r, k) do { \ + a = ROTL(SPH_T32(a + f(b, c, d) + r + k), s); \ + } while (0) WARNING: sizeof result should be sizeof(result) #292: FILE: john_the_ripper/src/rawSHA1_ng_fmt_plug.c:292: + strnzcpy(result, kFormatTag, sizeof result); WARNING: Avoid line continuations in quoted strings #272: FILE: john_the_ripper/src/openbsdsoftraid_fmt_plug.c:272: + {"\ WARNING: Avoid unnecessary line continuations #246: FILE: john_the_ripper/src/keepass_fmt_plug.c:246: + fprintf(stderr, "[!] Support for non-inlined data is currently missing from the " \ WARNING: single byte memset is suspicious. Swapped 2nd/3rd argument? #323: FILE: john_the_ripper/src/gpg2john.c:323: +} int gpg2john(int argc, char **argv) { int i; if (argc > 2 && (!strcmp(argv[1], "XX") || !strcmp(argv[1], "XX"))) { if (!strcmp(argv[1], "XX")) gpg_dbg = 1; else dump_subkeys = 1; for (i = 1; i < argc; ++i) argv[i] = argv[i+1]; --argc; } if (argc < 2) { fprintf(stderr, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", argv[0]); fprintf(stderr, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); fprintf(stderr, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); exit(-1); } for (i = 1; i < argc; ++i) { filename = argv[i]; if (freopen(filename, "XX", stdin) == NULL) warn_exit("XXXXXXXXXXXXXX", filename); parse_packet(); if (*last_hash) { char login[4096], *cp; char *gecos_remains = gecos; const char *ext[] = {"XXXX", "XXXX"}; if (!gecos[0]) { cp = strip_suffixes(jtr_basename(filename), ext, 2); strnzcpy(gecos, cp, sizeof(gecos)); } strnzcpy(login, gecos, sizeof(login)); if ((cp = strchr(login, 'X'))) memset(cp, 0, 1); if ((cp = strrchr(login, 'X'))) memset(cp, 0, 1); gecos_remains += strlen(login); cp = &login[strlen(login) - 1]; while (cp > login && *cp == 'X') *cp-- = 0; printf("XXXXXXXXXXXXXXXX", login, last_hash, gecos, filename); *last_hash = 0; } } exit(EXIT_SUCCESS); } WARNING: Too many leading tabs - consider code refactoring #565: FILE: john_the_ripper/src/DOMINOSEC_fmt_plug.c:565: + if (ch < 'a' || ch > 'z') WARNING: Statements terminations use 1 semicolon #1722: FILE: john_the_ripper/src/common-opencl.c:1722: + for (num = autotune_get_next_gws_size(num, step, 1, default_value);; WARNING: Unnecessary parentheses #975: FILE: john_the_ripper/src/common-opencl.c:975: + if ((build_code != CL_SUCCESS)) { WARNING: do not add new typedefs #197: FILE: john_the_ripper/src/charset.c:197: +typedef struct { WARNING: __func__ should be used instead of gcc specific __FUNCTION__ #70: FILE: john_the_ripper/src/calc_stat.c:70: + fprintf(stderr, "%s:%d: malloc failed\n", __FUNCTION__, __LINE__); WARNING: unchecked sscanf return value #699: FILE: john_the_ripper/src/c3_fmt.c:699: + sscanf(c3_salt, "rounds=%d", &rounds); WARNING: Macros with flow control statements should be avoided #437: FILE: john_the_ripper/src/c3_fmt.c:437: +#define H0(s) \ + int i = strlen(s) - 2; \ + return i > 0 ? H((s), i) & 0xF : 0 +#define H1(s) \ WARNING: plain inline is preferred over __inline #49: FILE: john_the_ripper/src/blf_plug.c:49: +#define inline __inline WARNING: storage class should be at the beginning of the declaration #39: FILE: john_the_ripper/src/blake2b_plug.c:39: +JTR_ALIGN( 64 ) static const uint64_t blake2b_IV[8] = WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt #93: FILE: john_the_ripper/src/bench.c:93: +volatile int bench_running; WARNING: CVS style keyword markers, these will _not_ be updated #195: FILE: john_the_ripper/src/aix_smd5_fmt_plug.c:195: + * $Id: md5_crypt.c,v 1.1 2002-05-11 14:42:35 cpbotha Exp $ WARNING: macros should not use a trailing semicolon #71: FILE: john_the_ripper/src/AFS_fmt.c:71: +#define AFS_swap(x, y) \ + (y) = (x); WARNING: Missing a blank line after declarations #360: FILE: john_the_ripper/src/7z_fmt_plug.c:360: + unsigned char master[32]; + sevenzip_kdf((unsigned char*)saved_key[index], master);