You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
accessing fields in struct 'erow' is inefficient due to padding; only needs 40 bytes but is using 48 bytes
75 | typedefstructerow
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:75:16: note: use "__attribute__((packed))" to reduce the amount of padding applied to struct'erow'
note: this fix will not be applied because it overlaps with another fix
accessing fields in struct 'erow' is inefficient due to poor alignment; currently aligned to 8 bytes, but recommended alignment is 64 bytes
75 | typedefstructerow
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:75:16: note: use "__attribute__((aligned(64)))" to align struct'erow' to 64 bytes
note: this fix will not be applied because it overlaps with another fix
function 'editorUpdateSyntax' is within a recursive call chain
139 | voideditorUpdateSyntax(erow* row)
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:139:6: note: example recursive call chain, starting from function 'editorUpdateSyntax'
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:268:43: note: Frame #1: function 'editorUpdateSyntax' calls function 'editorUpdateSyntax' here:
268 | if(changed && row->idx + 1 < E.numrows) editorUpdateSyntax(&E.row[row->idx + 1]);
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:268:43: note: ... which was the starting point of the recursive call chain; there may be other cycles
parameter name 'c' is too short, expected at least 3 characters
408 | voideditorRowInsertChar(erow* row, int at, int c)
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:410:31: warning: statement should be inside braces [hicpp-braces-around-statements,readability-braces-around-statements]
410 | if(at < 0 || at > row->size) at = row->size;
| ^
| {
445 | editorRowInsertChar(&E.row[E.cy], E.cx, key);
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:445:37: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
445 | editorRowInsertChar(&E.row[E.cy], E.cx, key);
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:451:35: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
451 | if(E.cx == 0) { editorInsertRow(E.cy, "", 0); }
| ^
456 | row = &E.row[E.cy];
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:457:29: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
457 | row->size = E.cx;
| ^
479 | editorRowAppendString(&E.row[E.cy - 1], row->chars, static_cast<size_t>(row->size));
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:480:18: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
480 | editorDelRow(E.cy);
| ^
variable name 'ap' is too short, expected at least 3 characters
515 | va_list ap;
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:516:12: warning: donot implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay]
516 | va_start(ap, fmt);
| ^
/examples/kilo.cpp:517:3: warning: [cert-err33-c]
the value returned by this function should be used
517 | vsnprintf(&E.statusmsg[0], E.statusmsg.capacity(), fmt.c_str(), ap);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:517:3: note: cast the expression to void to silence this warning
comparison of integers of different signs: 'int' and 'std::size_t' (aka 'unsigned long')
577 | for(int i = 0; i < E.numrows; i++)
| ~ ^ ~~~~~~~~~
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:580:35: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
580 | if(current == -1) { current = E.numrows - 1; }
| ^
variable 'filerow' of type 'int' can be declared 'const'
637 | int filerow = y + E.rowoff;
| ^
| const
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:637:19: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
637 | int filerow = y + E.rowoff;
| ^
no header providing "snprintf" is directly included
27 | int welcomelen = snprintf(welcome, sizeof(welcome), "Kilo editor -- version %s", KILO_VERSION.c_str());
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:643:36: warning: donot implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay]
643 | int welcomelen = snprintf(welcome, sizeof(welcome), "Kilo editor -- version %s", KILO_VERSION.c_str());
| ^
651 | while(padding--) screen.append("");
| ^
| ( ) != 0
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:651:25: warning: statement should be inside braces [hicpp-braces-around-statements,readability-braces-around-statements]
651 | while(padding--) screen.append("");
| ^
| {
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:652:23: warning: donot implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay]
652 | screen.append(welcome);
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:658:17: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
658 | int len = E.row[filerow].rsize - E.coloff;
| ^
comparison of integers of different signs: 'int' and 'std::size_t' (aka 'unsigned long')
710 | if(len > E.screencols) len = E.screencols;
| ~~~ ^ ~~~~~~~~~~~~
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:710:25: warning: statement should be inside braces [hicpp-braces-around-statements,readability-braces-around-statements]
710 | if(len > E.screencols) len = E.screencols;
| ^
| {
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:710:32: warning: narrowing conversion from 'std::size_t' (aka 'unsigned long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
710 | if(len > E.screencols) len = E.screencols;
| ^
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:711:29: warning: donot implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,hicpp-no-array-decay]
711 | screen.append(std::string(status, len));
| ^
772 | if(callback) callback(buf, c);
| ^
note: this fix will not be applied because it overlaps with another fix
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:772:19: warning: statement should be inside braces [hicpp-braces-around-statements,readability-braces-around-statements]
772 | if(callback) callback(buf, c);
| ^
note: this fix will not be applied because it overlaps with another fix
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:779:9: warning: donot call c-style vararg functions [cppcoreguidelines-pro-type-vararg,hicpp-vararg]
779 | editorSetStatusMessage("");
| ^
780 | if(callback) callback(buf, c);
| ^
note: this fix will not be applied because it overlaps with another fix
/home/runner/work/cpp-terminal/cpp-terminal/examples/kilo.cpp:780:21: warning: statement should be inside braces [hicpp-braces-around-statements,readability-braces-around-statements]
780 | if(callback) callback(buf, c);
| ^
note: this fix will not be applied because it overlaps with another fix
c4e0e89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-Linter Report⚠️
Some files did not pass the configured checks!
clang-tidy reports: 334 concern(s)
examples/kilo.cpp
/examples/kilo.cpp:36:1: warning: [fuchsia-statically-constructed-objects]
/examples/kilo.cpp:36:19: warning: [cert-err58-cpp]
/examples/kilo.cpp:61:98: warning: [bugprone-easily-swappable-parameters]
/examples/kilo.cpp:61:117: warning: [readability-identifier-length]
/examples/kilo.cpp:61:347: warning: [cppcoreguidelines-prefer-member-initializer]
/examples/kilo.cpp:75:1: warning: [modernize-use-using]
/examples/kilo.cpp:75:16: warning: [altera-struct-pack-align]
/examples/kilo.cpp:75:16: warning: [altera-struct-pack-align]
/examples/kilo.cpp:101:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:102:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:103:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:104:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:105:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:106:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:107:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:108:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:109:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:110:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:111:16: warning: [misc-non-private-member-variables-in-classes]
111 | std::string filename; | ^
/examples/kilo.cpp:112:16: warning: [misc-non-private-member-variables-in-classes]
112 | std::string statusmsg; | ^
/examples/kilo.cpp:113:3: warning: [misc-include-cleaner]
/examples/kilo.cpp:113:16: warning: [misc-non-private-member-variables-in-classes]
/examples/kilo.cpp:114:16: warning: [misc-non-private-member-variables-in-classes]
114 | editorSyntax syntax; | ^
/examples/kilo.cpp:120:1: warning: [fuchsia-statically-constructed-objects]
/examples/kilo.cpp:120:20: warning: [cert-err58-cpp]
/examples/kilo.cpp:120:20: warning: [readability-identifier-length]
/examples/kilo.cpp:124:1: warning: [fuchsia-statically-constructed-objects]
/examples/kilo.cpp:124:32: warning: [cert-err58-cpp]
/examples/kilo.cpp:127:1: warning: [fuchsia-statically-constructed-objects]
/examples/kilo.cpp:127:6: warning: [misc-include-cleaner]
/examples/kilo.cpp:127:29: warning: [cert-err58-cpp]
/examples/kilo.cpp:128:71: warning: [hicpp-signed-bitwise]
/examples/kilo.cpp:128:94: warning: [hicpp-signed-bitwise]
/examples/kilo.cpp:137:30: warning: [readability-identifier-length]
/examples/kilo.cpp:137:42: warning: [misc-include-cleaner]
/examples/kilo.cpp:137:42: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:139:6: warning: [misc-no-recursion]
/examples/kilo.cpp:139:6: warning: [readability-function-cognitive-complexity]
/examples/kilo.cpp:141:3: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:141:13: warning: [cppcoreguidelines-pro-type-reinterpret-cast]
/examples/kilo.cpp:141:46: warning: [bugprone-suspicious-realloc-usage]
/examples/kilo.cpp:141:46: warning: [clang-analyzer-optin.portability.UnixAPI]
/examples/kilo.cpp:141:46: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:141:46: warning: [misc-include-cleaner]
/examples/kilo.cpp:142:28: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:142:28: warning: [misc-include-cleaner]
/examples/kilo.cpp:155:20: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:155:39: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:157:10: warning: [readability-identifier-length]
/examples/kilo.cpp:158:9: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:160:5: warning: [misc-const-correctness]
/examples/kilo.cpp:160:19: warning: [readability-identifier-length]
/examples/kilo.cpp:160:29: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:161:5: warning: [misc-const-correctness]
/examples/kilo.cpp:161:39: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:163:8: warning: [readability-container-size-empty]
/examples/kilo.cpp:163:8: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:163:23: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:163:37: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:165:11: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:165:20: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:165:36: warning: [readability-container-data-pointer]
/examples/kilo.cpp:167:17: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
167 | memset(&row->hl[i], HL_COMMENT, row->rsize - i); | ^
/examples/kilo.cpp:172:8: warning: [readability-container-size-empty]
/examples/kilo.cpp:172:8: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:172:22: warning: [readability-container-size-empty]
/examples/kilo.cpp:172:22: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:172:37: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:174:10: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:176:9: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
176 | row->hl[i] = HL_MLCOMMENT; | ^
/examples/kilo.cpp:177:13: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:177:22: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:177:38: warning: [readability-container-data-pointer]
/examples/kilo.cpp:179:19: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:191:16: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:191:25: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:191:41: warning: [readability-container-data-pointer]
/examples/kilo.cpp:193:17: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
193 | memset(&row->hl[i], HL_MLCOMMENT, mcs.size()); | ^
/examples/kilo.cpp:200:8: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:200:25: warning: [hicpp-signed-bitwise]
/examples/kilo.cpp:202:10: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:204:9: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
204 | row->hl[i] = HL_STRING; | ^
/examples/kilo.cpp:207:11: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:221:11: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
221 | row->hl[i] = HL_STRING; | ^
/examples/kilo.cpp:228:8: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:228:25: warning: [hicpp-signed-bitwise]
/examples/kilo.cpp:230:11: warning: [misc-include-cleaner]
/examples/kilo.cpp:230:11: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:230:26: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:232:9: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
232 | row->hl[i] = HL_NUMBER; | ^
/examples/kilo.cpp:239:8: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:241:11: warning: [cppcoreguidelines-init-variables]
/examples/kilo.cpp:241:11: warning: [readability-identifier-length]
/examples/kilo.cpp:242:18: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:242:18: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:242:18: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:244:44: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:245:9: warning: [misc-const-correctness]
/examples/kilo.cpp:245:20: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:245:20: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:246:12: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:248:13: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:248:22: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:248:38: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:248:73: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:250:19: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:250:31: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:255:10: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:262:16: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:266:3: warning: [misc-const-correctness]
/examples/kilo.cpp:266:26: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:268:6: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:268:30: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:268:63: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:293:3: warning: [modernize-loop-convert]
/examples/kilo.cpp:295:33: warning: [cppcoreguidelines-pro-bounds-constant-array-index]
/examples/kilo.cpp:297:10: warning: [cppcoreguidelines-pro-bounds-constant-array-index]
/examples/kilo.cpp:299:20: warning: [cppcoreguidelines-pro-bounds-constant-array-index]
299 | E.syntax = HLDB[j]; | ^
/examples/kilo.cpp:300:92: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:309:36: warning: [readability-identifier-length]
/examples/kilo.cpp:311:7: warning: [readability-identifier-length]
/examples/kilo.cpp:312:28: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:314:8: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:320:36: warning: [readability-identifier-length]
/examples/kilo.cpp:323:7: warning: [readability-identifier-length]
/examples/kilo.cpp:326:8: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:338:8: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:340:3: warning: [cppcoreguidelines-owning-memory]
340 | free(row->render); | ^~~~~~~~~~~~~~~~~
/examples/kilo.cpp:340:3: warning: [misc-include-cleaner]
27 | free(row->render); | ^
/examples/kilo.cpp:341:3: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:341:17: warning: [cppcoreguidelines-pro-type-reinterpret-cast]
/examples/kilo.cpp:341:41: warning: [misc-include-cleaner]
/examples/kilo.cpp:341:48: warning: [bugprone-misplaced-widening-cast]
/examples/kilo.cpp:342:32: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:342:32: warning: [misc-include-cleaner]
/examples/kilo.cpp:347:8: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:349:7: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:350:39: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:352:12: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:352:33: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:354:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:360:26: warning: [readability-identifier-length]
/examples/kilo.cpp:360:42: warning: [readability-identifier-length]
/examples/kilo.cpp:362:19: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:364:3: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:364:11: warning: [cppcoreguidelines-pro-type-reinterpret-cast]
/examples/kilo.cpp:364:35: warning: [bugprone-suspicious-realloc-usage]
/examples/kilo.cpp:364:35: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:364:35: warning: [misc-include-cleaner]
/examples/kilo.cpp:365:26: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:365:26: warning: [misc-include-cleaner]
/examples/kilo.cpp:366:12: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:366:28: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:367:23: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:367:25: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:367:44: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:369:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
369 | E.row[at].idx = at; | ^
/examples/kilo.cpp:371:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:372:3: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:372:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:372:21: warning: [cppcoreguidelines-pro-type-cstyle-cast]
/examples/kilo.cpp:372:21: warning: [google-readability-casting]
/examples/kilo.cpp:372:28: warning: [misc-include-cleaner]
/examples/kilo.cpp:373:6: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:376:5: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:376:5: warning: [misc-include-cleaner]
/examples/kilo.cpp:378:10: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
378 | memcpy(E.row[at].chars, s, len); | ^
/examples/kilo.cpp:379:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:381:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:382:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:383:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:384:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:385:20: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:393:3: warning: [cppcoreguidelines-owning-memory]
393 | free(row->render); | ^~~~~~~~~~~~~~~~~
/examples/kilo.cpp:393:3: warning: [misc-include-cleaner]
/examples/kilo.cpp:394:3: warning: [cppcoreguidelines-owning-memory]
394 | free(row->chars); | ^~~~~~~~~~~~~~~~
/examples/kilo.cpp:394:3: warning: [misc-include-cleaner]
/examples/kilo.cpp:395:3: warning: [cppcoreguidelines-owning-memory]
395 | free(row->hl); | ^~~~~~~~~~~~~
/examples/kilo.cpp:395:3: warning: [misc-include-cleaner]
27 | free(row->hl); | ^
/examples/kilo.cpp:398:23: warning: [readability-identifier-length]
/examples/kilo.cpp:400:19: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:401:18: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
401 | editorFreeRow(&E.row[at]); | ^
/examples/kilo.cpp:402:12: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:402:24: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:403:19: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:403:21: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:403:43: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:408:41: warning: [readability-identifier-length]
/examples/kilo.cpp:408:49: warning: [readability-identifier-length]
/examples/kilo.cpp:411:3: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:411:16: warning: [cppcoreguidelines-pro-type-reinterpret-cast]
/examples/kilo.cpp:411:40: warning: [bugprone-suspicious-realloc-usage]
/examples/kilo.cpp:411:40: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:411:40: warning: [misc-include-cleaner]
/examples/kilo.cpp:412:31: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:412:31: warning: [misc-include-cleaner]
/examples/kilo.cpp:413:12: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:413:33: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:415:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:420:45: warning: [readability-identifier-length]
/examples/kilo.cpp:422:3: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:422:16: warning: [cppcoreguidelines-pro-type-reinterpret-cast]
/examples/kilo.cpp:422:40: warning: [bugprone-suspicious-realloc-usage]
/examples/kilo.cpp:422:40: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:422:40: warning: [misc-include-cleaner]
/examples/kilo.cpp:423:31: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:423:31: warning: [misc-include-cleaner]
/examples/kilo.cpp:424:11: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
424 | memcpy(&row->chars[row->size], s, len); | ^
/examples/kilo.cpp:426:3: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:431:38: warning: [readability-identifier-length]
/examples/kilo.cpp:434:12: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:434:29: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:445:24: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:454:18: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:455:32: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:456:30: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:458:5: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:470:16: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:478:12: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:479:28: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:490:76: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:490:120: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:500:32: warning: [misc-include-cleaner]
/examples/kilo.cpp:503:9: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:505:5: warning: [google-runtime-int]
/examples/kilo.cpp:505:32: warning: [google-runtime-int]
/examples/kilo.cpp:506:11: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:513:6: warning: [cert-dcl50-cpp]
/examples/kilo.cpp:513:47: warning: [performance-unnecessary-value-param]
/examples/kilo.cpp:515:11: warning: [readability-identifier-length]
/examples/kilo.cpp:517:3: warning: [cert-err33-c]
/examples/kilo.cpp:517:3: warning: [misc-include-cleaner]
/examples/kilo.cpp:517:13: warning: [readability-container-data-pointer]
/examples/kilo.cpp:519:22: warning: [misc-include-cleaner]
/examples/kilo.cpp:535:3: warning: [misc-const-correctness]
/examples/kilo.cpp:554:6: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:556:12: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:556:67: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:557:5: warning: [cppcoreguidelines-owning-memory]
557 | free(saved_hl); | ^~~~~~~~~~~~~~
/examples/kilo.cpp:557:5: warning: [misc-include-cleaner]
/examples/kilo.cpp:577:20: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:581:21: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:583:20: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
583 | erow* row = &E.row[current]; | ^
/examples/kilo.cpp:585:8: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:593:7: warning: [cppcoreguidelines-owning-memory]
/examples/kilo.cpp:593:23: warning: [cppcoreguidelines-pro-type-reinterpret-cast]
/examples/kilo.cpp:593:47: warning: [misc-include-cleaner]
/examples/kilo.cpp:594:33: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:594:33: warning: [misc-include-cleaner]
/examples/kilo.cpp:596:15: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
596 | memset(&row->hl[match - row->render], HL_MATCH, query.size()); | ^
/examples/kilo.cpp:609:3: warning: [misc-const-correctness]
/examples/kilo.cpp:625:50: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:629:11: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:630:11: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:633:6: warning: [readability-function-cognitive-complexity]
/examples/kilo.cpp:635:11: warning: [readability-identifier-length]
/examples/kilo.cpp:635:18: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:635:20: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:637:5: warning: [misc-const-correctness]
/examples/kilo.cpp:638:16: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:643:27: warning: [misc-include-cleaner]
/examples/kilo.cpp:644:23: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:646:12: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:651:15: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:651:15: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:658:17: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:660:14: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:661:22: warning: [readability-identifier-length]
/examples/kilo.cpp:661:39: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:662:22: warning: [readability-identifier-length]
/examples/kilo.cpp:662:39: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:664:22: warning: [cppcoreguidelines-init-variables]
/examples/kilo.cpp:664:22: warning: [readability-identifier-length]
/examples/kilo.cpp:665:18: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:667:12: warning: [misc-include-cleaner]
/examples/kilo.cpp:667:12: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:667:20: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:669:11: warning: [misc-const-correctness]
/examples/kilo.cpp:669:23: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:669:43: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:675:17: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:682:38: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:686:11: warning: [misc-const-correctness]
/examples/kilo.cpp:686:51: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
686 | Term::Color color = editorSyntaxToColor(hl[j]); | ^
/examples/kilo.cpp:692:38: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:698:25: warning: [misc-include-cleaner]
/examples/kilo.cpp:708:15: warning: [misc-include-cleaner]
/examples/kilo.cpp:708:127: warning: [clang-diagnostic-format]
/examples/kilo.cpp:708:138: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:709:3: warning: [misc-const-correctness]
/examples/kilo.cpp:709:15: warning: [misc-include-cleaner]
/examples/kilo.cpp:710:10: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:712:9: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:712:13: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:714:27: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:731:23: warning: [misc-include-cleaner]
/examples/kilo.cpp:733:31: warning: [misc-include-cleaner]
/examples/kilo.cpp:741:23: warning: [misc-include-cleaner]
12 | screen.append(Term::cursor_off()); | ^
/examples/kilo.cpp:742:23: warning: [misc-include-cleaner]
/examples/kilo.cpp:746:23: warning: [misc-include-cleaner]
/examples/kilo.cpp:747:23: warning: [misc-include-cleaner]
/examples/kilo.cpp:762:5: warning: [misc-const-correctness]
/examples/kilo.cpp:762:15: warning: [readability-identifier-length]
/examples/kilo.cpp:772:10: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:780:12: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:786:8: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:792:48: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:801:16: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
801 | E.cx = E.row[E.cy].size; | ^
/examples/kilo.cpp:805:10: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:805:22: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:806:15: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:806:27: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:821:49: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:822:3: warning: [misc-const-correctness]
/examples/kilo.cpp:822:16: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:823:11: warning: [clang-diagnostic-sign-compare]
/examples/kilo.cpp:826:6: warning: [readability-function-cognitive-complexity]
/examples/kilo.cpp:830:3: warning: [misc-const-correctness]
/examples/kilo.cpp:835:7: warning: [misc-const-correctness]
/examples/kilo.cpp:845:14: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:865:41: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]
/examples/kilo.cpp:891:17: warning: [altera-id-dependent-backward-branch]
/examples/kilo.cpp:891:17: warning: [readability-implicit-bool-conversion]
/examples/kilo.cpp:928:7: warning: [misc-const-correctness]
/examples/kilo.cpp:970:64: warning: [performance-avoid-endl]
/examples/kilo.cpp:971:5: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:971:10: warning: [misc-include-cleaner]
/examples/kilo.cpp:973:20: warning: [misc-include-cleaner]
/examples/kilo.cpp:975:51: warning: [performance-avoid-endl]
/examples/kilo.cpp:976:5: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:976:10: warning: [misc-include-cleaner]
/examples/kilo.cpp:980:38: warning: [performance-avoid-endl]
/examples/kilo.cpp:981:5: warning: [concurrency-mt-unsafe]
/examples/kilo.cpp:981:10: warning: [misc-include-cleaner]
Have any feedback or feature suggestions? Share it here.