aws/aws-sdk-cpp

Duplicate definitions for AWS_CREDENTIAL_PROVIDER_EXPIRATION_GRACE_PERIOD

bcsgh opened this issue · 2 comments

Describe the bug

The unqualified symbol AWS_CREDENTIAL_PROVIDER_EXPIRATION_GRACE_PERIOD is defined in two different namespaces (with the same type and value).

https://github.com/search?q=repo%3Aaws%2Faws-sdk-cpp%20AWS_CREDENTIAL_PROVIDER_EXPIRATION_GRACE_PERIOD&type=code

While this isn't likely an issue now (due to them being identical and only one of them actually being used) it could become an issue.

Expected Behavior

Constant names always resolved to the same symbol.

Current Behavior

two different constants with the same name in different namespaces.

Reproduction Steps

Build under clang with -Werror -Wunused-const-variable.

Possible Solution

Delete this line:

static const int AWS_CREDENTIAL_PROVIDER_EXPIRATION_GRACE_PERIOD = 5 * 1000;

Additional Information/Context

No response

AWS CPP SDK version used

head

Compiler and Version used

clang version 10.0.0-4ubuntu1

Operating System and version

Linux

Thanks for pointing this out. Testing the change to make sure it doesn't break anything

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.