Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
476 stars 75 forks source link

s25update submodule update: libCURL 7.32+ fix #1556

Closed S4enL0ng closed 1 year ago

S4enL0ng commented 1 year ago

Problems should now be fixed. It does work for me. Local Tests are passed.

S4enL0ng commented 1 year ago

Hmpf... how is this fixable?

/home/runner/work/s25client/s25client/external/s25update/src/s25update.cpp:123:15: warning: 'ProgressBarCallback' is a static definition in anonymous namespace; static is redundant here [readability-static-definition-in-anonymous-namespace] Error: Process completed with exit code 1.

I see the problem for readability. but i dont know how i can satisfy this test there.

#if CURL_AT_LEAST_VERSION(7, 32, 00)
static size_t ProgressBarCallback(std::string* data, curl_off_t dltotal, curl_off_t dlnow, curl_off_t /*ultotal*/,
                                  curl_off_t /*ulnow*/)
#else
int ProgressBarCallback(std::string* data, double dltotal, double dlnow, double /*ultotal*/, double /*ulnow*/)
#endif
Flamefire commented 1 year ago

I see the problem for readability. but i dont know how i can satisfy this test there.

Just what it tells you: Remove the static in static size_t ProgressBarCallback as it is redundant because it already is in an anonymous namespace. Missed that too in the other PR as it only is a "readability" issue.

S4enL0ng commented 1 year ago

Oh, i thought it meant the doubled definition altogether, not only the static definition. Okay, thanks.