Skip to content
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

[core] Fix unused-parameter warnings #8110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndrewShkrob
Copy link
Member

No description provided.

Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
@@ -142,15 +142,6 @@ set(SRC
validate_and_format_contacts.hpp
)

set(OTHER_FILES drules_struct.proto)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not needed anymore?

"$<$<CXX_COMPILER_ID:AppleClang,Clang>:-Wno-shorten-64-to-32> $<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>"
)

file(COPY ${OTHER_FILES} DESTINATION ${CMAKE_BINARY_DIR})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment on lines +104 to +105
NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const & source, vector<int8_t> const &,
int8_t const)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmon )

Suggested change
NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const & source, vector<int8_t> const &,
int8_t const)
NamesDataSource EditableMapObject::GetNamesDataSource(StringUtf8Multilang const & source, vector<int8_t> const &, int8_t const)

@@ -11,7 +11,7 @@ namespace downloader_tests

class DownloaderStub : public storage::MapFilesDownloaderWithPing
{
virtual void Download(storage::QueuedCountry && queuedCountry)
void Download(storage::QueuedCountry &&) override
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a different warning )

@@ -1,7 +1,6 @@
# Flags for all
set(OMIM_WARNING_FLAGS
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-unused-parameter> # We have a lot of functions with unused parameters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the pros of enabling this warning? I see the following cons:

  • Git blame is more complicated.
  • Where parameter names are removed, they're not clear and the reader should guess to understand.
  • Where parameter names are commented, it is not possible to comment large blocks of code with /* */ anymore.

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.

None yet

2 participants