]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix unused variable 'COLORS' warning in optimizer.c (#144373)
authorAN Long <aisk@users.noreply.github.com>
Sun, 1 Feb 2026 04:01:45 +0000 (13:01 +0900)
committerGitHub <noreply@github.com>
Sun, 1 Feb 2026 04:01:45 +0000 (04:01 +0000)
Python/optimizer.c

index b8208c7d888e389e6e6fb5ee0c2077928557d30a..2802ef17dbf5c2e735d098cee149612ea6b1ac35 100644 (file)
@@ -1993,6 +1993,8 @@ find_line_number(PyCodeObject *code, _PyExecutorObject *executor)
 #define BLACK "#000000"
 #define LOOP "#00c000"
 
+#ifdef Py_STATS
+
 static const char *COLORS[10] = {
     "9",
     "8",
@@ -2005,8 +2007,6 @@ static const char *COLORS[10] = {
     "1",
     WHITE,
 };
-
-#ifdef Py_STATS
 const char *
 get_background_color(_PyUOpInstruction const *inst, uint64_t max_hotness)
 {