Fix lots of warnings, adjust build flags

laumann
May 10, 2023, 9:20 PM
NZNIG2ULNMS5Z3OWEKRVOPLFA6CWYNF47U7UMXNZFSX256F2ZZVAC

Dependencies

  • [2] KEC3WLFN change: remove debugging lines
  • [3] XTVLIC24 change: refactor to print_change()
  • [4] XJ2PEH74 add meson.build
  • [5] UHHEEY5J Update README with build instructions using muon + samurai
  • [6] QYRJIOYP change: separate decoding and printing of hashed struct
  • [7] ZKAOPMCH change: Implement decoding of edits, atoms, positions, among others
  • [8] OBKF6SII change: decompress the hashed section too
  • [9] FMYCPGKD change: extract hash list decoding into reused function
  • [10] LCEKN25G change: parse authors
  • [11] 2U7P5SFQ Change struct names "struct foo -> typedef struct Foo"
  • [12] RIWSVVAS change: decompress the 'contents' with zstd_seekable
  • [13] JAGXXSR7 change: initial work on decoding hunks
  • [14] YDQLW2ZO change: rework printing of patches - print Edit and Newvertex types
  • [15] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change
  • [16] N3PUHKQN change: fix scoping issue
  • [17] ML5XMZEU Makefile: rearrange targets
  • [18] XTKRT6OQ format the codebase
  • [*] B3XLVPNC Add ani.c and initial Makefile

Change contents

  • replacement in meson.build at line 1
    [4.36][4.37:57]()
    project('ani', 'c')
    [4.36]
    [4.57]
    project('ani', 'c',
    default_options : ['c_std=c99']
    )
    add_project_arguments(
    '-g3',
    '-D_POSIX_C_SOURCE=200809L',
    # Extra flags from https://nullprogram.com/blog/2023/04/29/
    '-Wdouble-promotion',
    '-Wconversion',
    #'-fsanitize-undefined-trap-on-error',
    #'-fsanitize=address', # can't have this one because of the assembly :-(
    '-fno-diagnostics-color',
    language: 'c'
    )
  • replacement in change.c at line 32
    [6.61][6.61:69]()
    int i;
    [6.61]
    [6.1488]
    size_t i;
  • replacement in change.c at line 115
    [6.745][6.745:787]()
    if (compressed_read != compressed_len) {
    [6.745]
    [6.1451]
    if (compressed_read != (ssize_t)compressed_len) {
  • replacement in change.c at line 164
    [6.101][6.101:109]()
    int i;
    [6.101]
    [6.109]
    size_t i;
  • replacement in change.c at line 270
    [6.2929][6.2929:2937]()
    int i;
    [6.2929]
    [6.3192]
    size_t i;
  • replacement in change.c at line 300
    [6.3827][6.3342:3350](),[6.3342][6.3342:3350]()
    int i;
    [6.3827]
    [2.59]
    size_t i;
  • replacement in change.c at line 356
    [6.3870][6.3870:3878]()
    int i;
    [6.3870]
    [6.3878]
    size_t i;
  • replacement in change.c at line 465
    [6.479][6.591:600](),[6.591][6.591:600]()
    int j;
    [6.479]
    [6.600]
    size_t j;
  • replacement in change.c at line 522
    [6.64][6.64:72]()
    int i;
    [6.64]
    [6.72]
    size_t i;
  • replacement in change.c at line 528
    [6.182][6.182:234]()
    printf("P%d.%lu", i + 1, plist->entries[i].pos);
    [6.182]
    [6.234]
    printf("P%lu.%lu", i + 1, plist->entries[i].pos);
  • replacement in change.c at line 542
    [3.246][6.430:446](),[6.430][6.430:446]()
    int i, waseol;
    [3.246]
    [6.446]
    size_t i;
    int waseol;
  • replacement in change.c at line 583
    [3.308][3.308:316]()
    int i;
    [3.308]
    [3.316]
    size_t i;
  • replacement in change.c at line 592
    [3.601][3.601:610]()
    int j;
    [3.601]
    [3.610]
    size_t j;
  • replacement in change.c at line 610
    [3.1092][3.1092:1117]()
    printf("\n#Hunks\n\n");
    [3.1092]
    [3.1117]
    printf("\n# Hunks\n\n");
  • replacement in change.c at line 616
    [3.1295][3.1295:1362]()
    printf("%d. %s", i + 1, hunk_basehunk_type_str(hunk->hunktype));
    [3.1295]
    [3.1362]
    printf("%lu. %s", i + 1, hunk_basehunk_type_str(hunk->hunktype));
  • replacement in Makefile at line 36
    [5.293][5.293:312]()
    @muon setup build
    [5.293]
    [6.16]
    @meson setup --warnlevel=3 build