Skip to content

Fix #9389 ("debug: Executable scope 'x' with unknown function." with … - #2261

Merged
danmar merged 2 commits into
cppcheck-opensource:masterfrom
IOBYTE:master
Oct 10, 2019
Merged

danmar merged 2 commits into
cppcheck-opensource:masterfrom
IOBYTE:master

Conversation

@IOBYTE

@IOBYTE IOBYTE commented Oct 10, 2019

Copy link
Copy Markdown
Collaborator

…"using namespace")

@IOBYTE

IOBYTE commented Oct 10, 2019

Copy link
Copy Markdown
Collaborator Author

The failure has nothing to do with this patch:

W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
W: GPG error: https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B05F25D762E3157
W: The repository 'https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease' is not signed.
W: There is no public key available for the following key IDs:
6B05F25D762E3157  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages.gz  Hash Sum mismatch
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages.gz  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

@danmar danmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good.. I just had a small nit.

Comment thread lib/symboldatabase.cpp Outdated
}

namespace {
std::string qualifiedName(const Scope *scope)

@danmar danmar Oct 10, 2019 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please use static for internal functions. Please feel free to use anonymous namespaces for types. It makes it easier to debug with gdb. I can use break qualifiedName if it's static but not if you use a anonymous namespace.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@danmar
danmar merged commit fe1f601 into cppcheck-opensource:master Oct 10, 2019
jubnzv pushed a commit to jubnzv/cppcheck that referenced this pull request Nov 13, 2019
cppcheck-opensource#2261)

* Fix #9389 ("debug: Executable scope 'x' with unknown function." with "using namespace")

* use static rather than anonymous namespace for new functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants