db.c: In function char* str_dup(const char*):
db.c:2681: error: cast from const char* to unsigned int loses precision
cc1plus: warnings being treated as errors
db.c: In function void do_dump(CHAR_DATA*, const char*):
db.c:2816: warning: format %8d expects type int, but argument 4 has type long unsigned int
db.c:2816: warning: format %d expects type int, but argument 6 has type long unsigned int
db.c:2824: warning: format %8d expects type int, but argument 4 has type long unsigned int
db.c:2824: warning: format %d expects type int, but argument 6 has type long unsigned int
db.c:2834: warning: format %8d expects type int, but argument 4 has type long unsigned int
db.c:2834: warning: format %d expects type int, but argument 6 has type long unsigned int
db.c:2846: warning: format %8d expects type int, but argument 4 has type long unsigned int
db.c:2861: warning: format %8d expects type int, but argument 4 has type long unsigned int
db.c:2861: warning: format %d expects type int, but argument 6 has type long unsigned int
db.c:2869: warning: format %8d expects type int, but argument 4 has type long unsigned int
db.c:2869: warning: format %d expects type int, but argument 6 has type long unsigned int
db.c:2873: warning: format %8d expects type int, but argument 4 has type long unsigned int
db.c:2877: warning: format %8d expects type int, but argument 4 has type long unsigned int
do
pick a random number from 0 to INT_MAX
mask off the lower 8 bits (resulting in a number from 0 to 127)
until that number < 6
The codebase contains 44851 lines of code.
The overall average line length of the codebase is 24.6746337874295 characters,
and the overall longest line is 104 characters.
Length 104 1
Length 103 1
Length 98 1
Length 95 4
Length 93 2
Length 91 1
Length 90 2
Length 89 4
Length 88 3
Length 87 3
Length 85 2
Length 84 2
Length 83 2
Length 82 6
Length 81 19
Length 80 62
Length 79 91
Length 78 95
Length 77 110
Length 76 522
Length 75 73
Length 74 134
Length 73 148
Length 72 129
Length 71 105
Length 70 165
Length 69 243
Length 68 157
Length 67 198
Length 66 170
Length 65 209
Length 64 195
Length 63 242
Length 62 235
Length 61 297
Length 60 288
Length 59 335
Length 58 388
Length 57 395
Length 56 313
Length 55 379
Length 54 388
Length 53 457
Length 52 461
Length 51 422
Length 50 322
Length 49 346
Length 48 338
Length 47 327
Length 46 363
Length 45 430
Length 44 362
Length 43 382
Length 42 380
Length 41 494
Length 40 448
Length 39 440
Length 38 491
Length 37 537
Length 36 493
Length 35 616
Length 34 566
Length 33 506
Length 32 609
Length 31 556
Length 30 613
Length 29 563
Length 28 592
Length 27 575
Length 26 627
Length 25 632
Length 24 498
Length 23 620
Length 22 660
Length 21 696
Length 20 437
Length 19 645
Length 18 641
Length 17 513
Length 16 452
Length 15 553
Length 14 461
Length 13 536
Length 12 492
Length 11 665
Length 10 225
Length 9 505
Length 8 1029
Length 7 409
Length 6 1186
Length 5 3431
Length 4 228
Length 3 522
Length 2 1867
Length 1 1997
Length 0 5516
For example, for me… intmax_t and int64_t both get mapped to "long long int", whereas on a real 64-bit archetecture, they're "long int". int32_t is an int for both of us. size_t and ptrdiff_t both vary, as you'd expect. And there are the usual INT8_MIN/UNINT16_MAX defines.
We should try to avoid using such things in printf's though, since printf tokens won't adapt as readily. "%ld" will always mean "long int", "%llx" will always mean "long long int as hex", even though a "long int" will vary in actual size.