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

Generic variable names cause collisions #88

Open
rin67630 opened this issue Jun 24, 2024 · 0 comments · May be fixed by #89
Open

Generic variable names cause collisions #88

rin67630 opened this issue Jun 24, 2024 · 0 comments · May be fixed by #89
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@rin67630
Copy link

rin67630 commented Jun 24, 2024

The ArduinoBearSSL library seem to create a problem:

Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2/tools/sdk/include/bearssl/bearssl_rand.h:205:16: note: in expansion of macro 'V'
  205 |  unsigned char V[64];

typedef struct {
/**
* \brief Pointer to the vtable.
*
* This field is set with the initialisation method/function.
*/
const br_prng_class *vtable;
#ifndef BR_DOXYGEN_IGNORE
unsigned char K[64];
unsigned char V[64];
const br_hash_class *digest_class;
#endif
} br_hmac_drbg_context;

Variables should not be named with capital letters, which conflicts with macros and constants.
Moreover it is recommended to take less generic names in libraries.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jun 25, 2024
@per1234 per1234 changed the title Problem with naming conventions. Generic variable names cause collisions Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants