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

error: redefinition of 'devt_hash_ops' const struct hash_ops devt_hash_ops #191

Closed
leleliu008 opened this issue Jan 9, 2021 · 0 comments · Fixed by #212
Closed

error: redefinition of 'devt_hash_ops' const struct hash_ops devt_hash_ops #191

leleliu008 opened this issue Jan 9, 2021 · 0 comments · Fixed by #212

Comments

@leleliu008
Copy link

In file included from /var/folders/jw/7vmz4m1970932zln9tb1whxr0000gn/T/tmp.5z8pxBHb/src/shared/hashmap.c:29:
/var/folders/jw/7vmz4m1970932zln9tb1whxr0000gn/T/tmp.5z8pxBHb/src/shared/hashmap.h:101:30: warning: 'extern' variable has an initializer [-Wextern-initializer]
extern const struct hash_ops devt_hash_ops = {
                             ^
/var/folders/jw/7vmz4m1970932zln9tb1whxr0000gn/T/tmp.5z8pxBHb/src/shared/hashmap.c:338:23: error: redefinition of 'devt_hash_ops'
const struct hash_ops devt_hash_ops = {
                      ^
/var/folders/jw/7vmz4m1970932zln9tb1whxr0000gn/T/tmp.5z8pxBHb/src/shared/hashmap.h:101:30: note: previous definition is here
extern const struct hash_ops devt_hash_ops = {
                             ^
1 warning and 1 error generated.
gmake[3]: *** [Makefile:535: hashmap.lo] Error 1
gmake[3]: Leaving directory '/private/var/folders/jw/7vmz4m1970932zln9tb1whxr0000gn/T/tmp.5z8pxBHb/1610218661/armeabi-v7a/src/shared'

src/shared/hashmap.h
src/shared/hashmap.c

kaniini added a commit that referenced this issue Nov 5, 2021
It is initialized in hashmap.c:338, and should not be initialized
in the header.

Fixes: #191
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
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 a pull request may close this issue.

1 participant