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

Re: [PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check)

From
Carlo Arenas <carenas@gmail.com>
Date
Oct 26, 2018, 03:15 UTC
Message-ID
<CAPUEspiFDX8280qezkQ0WvJ5-9cp2eG3p+zX4F6HZNgLBACoHw@mail.gmail.com>
In-Reply-To
<d5b54ed8-689b-6f12-5888-fb598db8f083@ramsayjones.plus.com>

On Thu, Oct 25, 2018 at 2:09 PM Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:

> Yes, this will 'fix' the 'commit-reach.h' header (not surprising),
> but I prefer my patch. ;-)

I apologize, I joined the list recently and so might had missed a reroll; the merged series in pu doesn't seem to include it and the error was around the code I changed, so wanted to make sure it would be addressed sooner rather than later.

eitherway, I agree with you my patch (or something better) would fit better in your topic branch than on mine and while I haven't seen your patch I am sure is most likely better.

> Still puzzled.

this are the last lines of a `make hdr-check` in Fedora Rawhide, it should behave the same regardless of OS or compiler used IMHO

    HDR commit-reach.h
commit-reach.h:45:28: warning: ‘struct object_id’ declared inside
parameter list will not be visible outside of this definition or
declaration
 int ref_newer(const struct object_id *new_oid, const struct object_id
*old_oid);
                            ^~~~~~~~~
In file included from commit-slab.h:5,
                 from commit-reach.h:4:
commit-reach.h: In function ‘contains_cache_at_peek’:
commit-slab-impl.h:47:14: error: dereferencing pointer to incomplete
type ‘const struct commit’
  nth_slab = c->index / s->slab_size;    \
              ^~
commit-slab-impl.h:7:2: note: in expansion of macro ‘implement_commit_slab’
  implement_commit_slab(slabname, elemtype, static MAYBE_UNUSED)
  ^~~~~~~~~~~~~~~~~~~~~
commit-slab.h:49:2: note: in expansion of macro ‘implement_static_commit_slab’
  implement_static_commit_slab(slabname, elemtype)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
commit-reach.h:57:1: note: in expansion of macro ‘define_commit_slab’
 define_commit_slab(contains_cache, enum contains_result);
 ^~~~~~~~~~~~~~~~~~
commit-reach.h: At top level:
commit-reach.h:69:41: warning: ‘struct object_array’ declared inside
parameter list will not be visible outside of this definition or
declaration
 int can_all_from_reach_with_flag(struct object_array *from,
                                         ^~~~~~~~~~~~
make: *** [Makefile:2685: commit-reach.hco] Error 1
Carlo
Previous: Ramsay JonesNext: Ramsay Jones
Message 8 of 9 in “delta-islands: avoid unused function messages”
  1. 0/3 delta-islands: avoid unused function messagesCarlo Marcelo Arenas Belón, Oct 25, 2018
  2. 1/3 commit-slab: move MAYBE_UNUSED into git-compat-utilCarlo Marcelo Arenas Belón, Oct 25, 2018
  3. 2/3 khash: silence -Wunused-function in delta-islands from khashCarlo Marcelo Arenas Belón, Oct 25, 2018
  4. SZEDER GáborOct 25, 2018
  5. 3/3 commit-slab: missing definitions and forward declarations (hdr-check)Carlo Marcelo Arenas Belón, Oct 25, 2018
  6. Ramsay JonesOct 25, 2018
  7. Ramsay JonesOct 25, 2018
  8. Carlo ArenasOct 26, 2018
  9. Ramsay JonesOct 27, 2018

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.