-
Notifications
You must be signed in to change notification settings - Fork 144
pkt-line: fix incorrect function declaration #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 <[email protected]>
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 <[email protected]>
/submit |
Submitted as [email protected] |
This branch is now known as |
This patch series was integrated into pu via git@d097692. |
This patch series was integrated into pu via git@ea68d60. |
This patch series was integrated into next via git@0feef07. |
This patch series was integrated into pu via git@7a09f5f. |
This patch series was integrated into next via git@7a09f5f. |
This patch series was integrated into master via git@7a09f5f. |
Closed via 7a09f5f. |
MS Visual C detected a mismatch between the declaration and the definition of
set_packet_header()
: it is declared with its second parameter missing theconst
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 ontopu
,next
,master
andmaint
).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).