git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 1/1] maintenance: separate parallelism safe and unsafe tasks

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2024, 08:24 UTC
Message-ID
<xmqq1pzich44.fsf@gitster.g>
In-Reply-To
<20241108173112.1240584-2-calvinwan@google.com>
Calvin Wan <calvinwan@google.com> writes:
> +	for (j = j; j < TASK__COUNT; j++) {

This seems to break the build. Here is what I got from my compiler.

builtin/gc.c:1588:9: error: explicitly assigning value of variable of type 'int' to itself [-Werror,-Wself-assign]
        for (j = j; j < TASK__COUNT; j++) {
             ~ ^ ~
builtin/gc.c:1535:11: error: variable 'j' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        else if (opts->detach > 0) {
                 ^~~~~~~~~~~~~~~~
builtin/gc.c:1588:11: note: uninitialized use occurs here
        for (j = j; j < TASK__COUNT; j++) {
                 ^
builtin/gc.c:1535:7: note: remove the 'if' if its condition is always true
        else if (opts->detach > 0) {
             ^~~~~~~~~~~~~~~~~~~~~~
builtin/gc.c:1533:6: error: variable 'j' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (found_selected)
            ^~~~~~~~~~~~~~
builtin/gc.c:1588:11: note: uninitialized use occurs here
        for (j = j; j < TASK__COUNT; j++) {
                 ^
builtin/gc.c:1533:2: note: remove the 'if' if its condition is always false
        if (found_selected)
        ^~~~~~~~~~~~~~~~~~~
builtin/gc.c:1508:10: note: initialize the variable 'j' to silence this warning
        int i, j, found_selected = 0;
                ^
                 = 0
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 9 of 13 in “maintenance: separate parallelism safe and unsafe tasks”
  1. 0/1 maintenance: separate parallelism safe and unsafe tasksCalvin Wan, Nov 8, 2024
  2. 1/1 maintenance: separate parallelism safe and unsafe tasksCalvin Wan, Nov 8, 2024
  3. Patrick SteinhardtNov 11, 2024
  4. Calvin WanNov 11, 2024
  5. Patrick SteinhardtNov 12, 2024
  6. Calvin WanNov 15, 2024
  7. Junio C HamanoNov 18, 2024
  8. Patrick SteinhardtNov 18, 2024
  9. Junio C HamanoNov 11, 2024
  10. Junio C HamanoNov 11, 2024
  11. Calvin WanNov 11, 2024
  12. Junio C HamanoNov 11, 2024
  13. Calvin WanNov 11, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.