|
2 | 2 |
|
3 | 3 | @preconcurrency import PackageDescription |
4 | 4 |
|
5 | | -let warningFlags: [String] = [] |
| 5 | +let warningFlags = [ |
| 6 | + // The main ones |
| 7 | + "-Werror", |
| 8 | + "-Wmost", |
| 9 | + "-Wall", |
| 10 | + "-Wextra", |
| 11 | + |
| 12 | + // Specifics that aren't covered by above |
| 13 | + "-Wanon-enum-enum-conversion", |
| 14 | + "-Warc-repeated-use-of-weak", |
| 15 | + "-Wbitfield-enum-conversion", |
| 16 | + "-Wbitwise-instead-of-logical", |
| 17 | + "-Wbitwise-op-parentheses", |
| 18 | + "-Wblock-capture-autoreleasing", |
| 19 | + "-Wbool-conversion", |
| 20 | + "-Wbool-operation", |
| 21 | + "-Wcalled-once-parameter", |
| 22 | + "-Wcast-align", |
| 23 | + "-Wclass-varargs", |
| 24 | + "-Wcomma", |
| 25 | + "-Wcomment", |
| 26 | + "-Wcompletion-handler", |
| 27 | + "-Wconditional-uninitialized", |
| 28 | + "-Wconstant-conversion", |
| 29 | + "-Wconsumed", |
| 30 | + "-Wconversion", |
| 31 | + "-Wcustom-atomic-properties", |
| 32 | + "-Wdelete-non-virtual-dtor", |
| 33 | + "-Wdeprecated", |
| 34 | + "-Wdeprecated-declarations", |
| 35 | + "-Wdocumentation", |
| 36 | + "-Wdocumentation-pedantic", |
| 37 | + "-Wdtor-name", |
| 38 | + "-Wduplicate-decl-specifier", |
| 39 | + "-Wduplicate-enum", |
| 40 | + "-Wduplicate-method-arg", |
| 41 | + "-Wduplicate-method-match", |
| 42 | + "-Wembedded-directive", |
| 43 | + "-Wempty-body", |
| 44 | + "-Wempty-init-stmt", |
| 45 | + "-Wenum-compare-conditional", |
| 46 | + "-Wenum-conversion", |
| 47 | + "-Wexit-time-destructors", |
| 48 | + "-Wexpansion-to-defined", |
| 49 | + "-Wflexible-array-extensions", |
| 50 | + "-Wfloat-conversion", |
| 51 | + "-Wfloat-equal", |
| 52 | + "-Wfor-loop-analysis", |
| 53 | + "-Wformat-non-iso", |
| 54 | + "-Wformat-pedantic", |
| 55 | + "-Wformat-type-confusion", |
| 56 | + "-Wfour-char-constants", |
| 57 | + "-Wframe-address", |
| 58 | + "-Widiomatic-parentheses", |
| 59 | + "-Wignored-qualifiers", |
| 60 | + "-Wimplicit", |
| 61 | + "-Wimplicit-atomic-properties", |
| 62 | + "-Wimplicit-fallthrough", |
| 63 | + "-Wimplicit-float-conversion", |
| 64 | + "-Wimplicit-function-declaration", |
| 65 | + "-Wimplicit-int", |
| 66 | + "-Wimplicit-int-conversion", |
| 67 | + "-Wimplicit-int-float-conversion", |
| 68 | + "-Wimplicit-retain-self", |
| 69 | + "-Winconsistent-missing-destructor-override", |
| 70 | + "-Winfinite-recursion", |
| 71 | + "-Wint-conversion", |
| 72 | + "-Wint-in-bool-context", |
| 73 | + "-Wkeyword-macro", |
| 74 | + "-Wlogical-op-parentheses", |
| 75 | + "-Wloop-analysis", |
| 76 | + "-Wmain", |
| 77 | + "-Wmethod-signatures", |
| 78 | + "-Wmisleading-indentation", |
| 79 | + "-Wmismatched-tags", |
| 80 | + "-Wmissing-braces", |
| 81 | + "-Wmissing-field-initializers", |
| 82 | + "-Wmissing-method-return-type", |
| 83 | + "-Wmissing-noreturn", |
| 84 | + "-Wmissing-variable-declarations", |
| 85 | + "-Wmove", |
| 86 | + "-Wnested-anon-types", |
| 87 | + "-Wno-four-char-constants", |
| 88 | + "-Wno-missing-field-initializers", |
| 89 | + "-Wno-missing-prototypes", |
| 90 | + "-Wno-semicolon-before-method-body", |
| 91 | + "-Wno-trigraphs", |
| 92 | + "-Wno-unknown-pragmas", |
| 93 | + "-Wnon-literal-null-conversion", |
| 94 | + "-Wnon-modular-include-in-module", |
| 95 | + "-Wnon-pod-varargs", |
| 96 | + "-Wnon-virtual-dtor", |
| 97 | + "-Wnull-pointer-arithmetic", |
| 98 | + "-Wnull-pointer-subtraction", |
| 99 | + "-Wobjc-literal-conversion", |
| 100 | + "-Wobjc-property-assign-on-object-type", |
| 101 | + "-Wobjc-redundant-api-use", |
| 102 | + "-Wobjc-signed-char-bool-implicit-int-conversion", |
| 103 | + "-Wover-aligned", |
| 104 | + "-Woverloaded-virtual", |
| 105 | + "-Woverriding-method-mismatch", |
| 106 | + "-Wparentheses", |
| 107 | + "-Wpessimizing-move", |
| 108 | + "-Wpointer-sign", |
| 109 | + "-Wquoted-include-in-framework-header", |
| 110 | + "-Wrange-loop-analysis", |
| 111 | + "-Wredundant-move", |
| 112 | + "-Wredundant-parens", |
| 113 | + "-Wreorder-ctor", |
| 114 | + "-Wreserved-macro-identifier", |
| 115 | + "-Wselector-type-mismatch", |
| 116 | + "-Wself-assign-overloaded", |
| 117 | + "-Wself-move", |
| 118 | + "-Wsemicolon-before-method-body", |
| 119 | + "-Wsequence-point", |
| 120 | + "-Wshadow", |
| 121 | + "-Wshadow-uncaptured-local", |
| 122 | + "-Wshift-sign-overflow", |
| 123 | + "-Wshorten-64-to-32", |
| 124 | + "-Wsign-compare", |
| 125 | + "-Wsign-conversion", |
| 126 | + "-Wsometimes-uninitialized", |
| 127 | + "-Wspir-compat", |
| 128 | + "-Wstatic-in-inline", |
| 129 | + "-Wstrict-potentially-direct-selector", |
| 130 | + "-Wstrict-prototypes", |
| 131 | + "-Wstring-conversion", |
| 132 | + "-Wsuggest-destructor-override", |
| 133 | + "-Wsuggest-override", |
| 134 | + "-Wsuper-class-method-mismatch", |
| 135 | + "-Wswitch", |
| 136 | + "-Wswitch-default", |
| 137 | + "-Wtautological-compare", |
| 138 | + "-Wtautological-unsigned-char-zero-compare", |
| 139 | + "-Wtautological-unsigned-enum-zero-compare", |
| 140 | + "-Wtautological-value-range-compare", |
| 141 | + "-Wtentative-definition-incomplete-type", |
| 142 | + "-Wthread-safety", |
| 143 | + "-Wunaligned-access", |
| 144 | + "-Wundeclared-selector", |
| 145 | + "-Wundef-prefix", |
| 146 | + "-Wundefined-func-template", |
| 147 | + "-Wundefined-internal-type", |
| 148 | + "-Wundefined-reinterpret-cast", |
| 149 | + "-Wunguarded-availability", |
| 150 | + "-Wuninitialized", |
| 151 | + "-Wuninitialized-const-reference", |
| 152 | + "-Wunneeded-internal-declaration", |
| 153 | + "-Wunneeded-member-function", |
| 154 | + "-Wunreachable-code", |
| 155 | + "-Wunreachable-code-loop-increment", |
| 156 | + "-Wunreachable-code-return", |
| 157 | + "-Wunused", |
| 158 | + "-Wunused-but-set-parameter", |
| 159 | + "-Wunused-const-variable", |
| 160 | + "-Wunused-exception-parameter", |
| 161 | + "-Wunused-function", |
| 162 | + "-Wunused-label", |
| 163 | + "-Wunused-parameter", |
| 164 | + "-Wunused-value", |
| 165 | + "-Wunused-variable", |
| 166 | + "-Wused-but-marked-unused", |
| 167 | + "-Wvector-conversion", |
| 168 | + "-Wweak-vtables", |
| 169 | + |
| 170 | + // To be added later (big job to fix this) |
| 171 | + // "-Wdirect-ivar-access", |
| 172 | + // "-Wobjc-interface-ivars", |
| 173 | + |
| 174 | + // Flags that we can't use for various reasons: |
| 175 | + // "-Wassign-enum", |
| 176 | + // "-Watomic-implicit-seq-cst", |
| 177 | + // "-Wcast-qual", |
| 178 | + // "-Wcast-function-type", |
| 179 | + |
| 180 | + // Must disable these because the auto-generated resource_bundle_accessor.m is naughty |
| 181 | + "-Wno-strict-prototypes", |
| 182 | + //"-Wnullable-to-nonnull-conversion", |
| 183 | +] |
6 | 184 |
|
7 | 185 | let package = Package( |
8 | 186 | name: "KSCrash", |
|
0 commit comments