Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pkt-line: fix incorrect function declaration#192

Closed
dscho wants to merge 2 commits intogitgitgadget:mastergitgitgadget/git:masterfrom
dscho:fix-set_packet_header-signaturedscho/git:fix-set_packet_header-signatureCopy head branch name to clipboard
Closed

pkt-line: fix incorrect function declaration#192
dscho wants to merge 2 commits intogitgitgadget:mastergitgitgadget/git:masterfrom
dscho:fix-set_packet_header-signaturedscho/git:fix-set_packet_header-signatureCopy head branch name to clipboard

Conversation

@dscho
Copy link
Member

@dscho dscho commented May 13, 2019

MS Visual C detected a mismatch between the declaration and the definition of set_packet_header(): it is declared with its second parameter missing the const attribute.

It also detected a mismatch between the declaration and the definition of parse_opt_unknown_cb().

These problems must have been introduced very recently; I do not recall seeing them before today in any of Git for Windows' ever-green branches (i.e. master semi-automatically rebased continously onto pu, next, master and maint).

You could not have seen it in git.git's own Azure Pipeline, as Git for Windows' version already has support to build with MSVC (I plan to submit this directly after v2.22.0 is out).

dscho added 2 commits May 13, 2019 23:43
When this function was changed in a97d007 (remote-curl: use
post_rpc() for protocol v2 also, 2019-02-21) from file-local to global,
the declaration was incorrectly missing the `const` qualifier.

Let's fix that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In f41179f (parse-options: avoid magic return codes, 2019-01-27),
the signature of the low-level parse-opt callback function was changed
to return an `enum`.

And while the implementations were changed, one declaration was left
unchanged, still claiming to return `int`.

This can potentially lead to problems, as compilers are free to choose
any integral type for an `enum` as long as it can represent all declared
values.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented May 13, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented May 13, 2019

Submitted as pull.192.git.gitgitgadget@gmail.com

pkt-line.h Show resolved Hide resolved
parse-options.h Show resolved Hide resolved
@gitgitgadget
Copy link

gitgitgadget bot commented May 15, 2019

This branch is now known as js/parseopt-unknown-cb-returns-an-enum.

@gitgitgadget
Copy link

gitgitgadget bot commented May 15, 2019

This patch series was integrated into pu via git@d097692.

@gitgitgadget gitgitgadget bot added the pu label May 15, 2019
@gitgitgadget
Copy link

gitgitgadget bot commented May 16, 2019

This patch series was integrated into pu via git@ea68d60.

@gitgitgadget
Copy link

gitgitgadget bot commented May 16, 2019

This patch series was integrated into next via git@0feef07.

@gitgitgadget gitgitgadget bot added the next label May 16, 2019
@gitgitgadget
Copy link

gitgitgadget bot commented May 19, 2019

This patch series was integrated into pu via git@7a09f5f.

@gitgitgadget
Copy link

gitgitgadget bot commented May 19, 2019

This patch series was integrated into next via git@7a09f5f.

@gitgitgadget
Copy link

gitgitgadget bot commented May 19, 2019

This patch series was integrated into master via git@7a09f5f.

@gitgitgadget gitgitgadget bot added the master label May 19, 2019
@gitgitgadget
Copy link

gitgitgadget bot commented May 19, 2019

Closed via 7a09f5f.

@gitgitgadget gitgitgadget bot closed this May 19, 2019
@dscho dscho deleted the fix-set_packet_header-signature branch May 20, 2019 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.