]> git.ipfire.org Git - thirdparty/git.git/commit - http.c
http: mark unused parameters in curl callbacks
authorJeff King <peff@peff.net>
Mon, 3 Jul 2023 06:44:05 +0000 (02:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 00:23:59 +0000 (17:23 -0700)
commitd0144007b185f5da87f197ceacc4aa5548d4214e
tree7f77139847254831d16fe844d1a79035e295fe27
parent1779deed39e68b8eab886aba8d9a903905e42cf3
http: mark unused parameters in curl callbacks

These functions are all used as callbacks for curl, so they have to
conform to a particular interface. But they don't need all of their
parameters:

  - fwrite_null() throws away the input, so it doesn't look at most
    parameters

  - fwrite_wwwauth() in theory could take the auth struct in its void
    pointer, but instead we just access it as the global http_auth
    (matching the rest of the code in this file)

  - curl_trace() always writes via the trace mechanism, so it doesn't
    need its void pointer to know where to send things. Likewise, it
    ignores the CURL parameter, since nothing we trace requires querying
    the handle.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c