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

cutest_bitset.c:22: error: 'for' loop initial declaration used outside C99 mode#71

Closed
noloader opened this issue Mar 18, 2020 · 8 comments

Comments

@noloader
Copy link
Contributor

Hi Everyone,

I working from nsd master on OpenBSD 6.6. Bootstrap and configure go well: make check has a small hiccup:

gcc -I. -g -O2 -c ./tpkg/cutest/cutest_util.c
gcc -I. -g -O2 -c ./tpkg/cutest/cutest_bitset.c
./tpkg/cutest/cutest_bitset.c: In function 'bitset_set_unset_test':
./tpkg/cutest/cutest_bitset.c:22: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c:30: error: redefinition of 'bit'
./tpkg/cutest/cutest_bitset.c:22: error: previous definition of 'bit' was here
./tpkg/cutest/cutest_bitset.c:30: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c:34: error: redefinition of 'bit'
./tpkg/cutest/cutest_bitset.c:30: error: previous definition of 'bit' was here
./tpkg/cutest/cutest_bitset.c:34: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c:38: error: redefinition of 'bit'
./tpkg/cutest/cutest_bitset.c:34: error: previous definition of 'bit' was here
./tpkg/cutest/cutest_bitset.c:38: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c: In function 'bitset_or_even_odd':
./tpkg/cutest/cutest_bitset.c:78: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c:87: error: redefinition of 'bit'
./tpkg/cutest/cutest_bitset.c:78: error: previous definition of 'bit' was here
./tpkg/cutest/cutest_bitset.c:87: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c:95: error: redefinition of 'bit'
./tpkg/cutest/cutest_bitset.c:87: error: previous definition of 'bit' was here
./tpkg/cutest/cutest_bitset.c:95: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c: In function 'bitset_or_even_even':
./tpkg/cutest/cutest_bitset.c:126: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c:133: error: redefinition of 'bit'
./tpkg/cutest/cutest_bitset.c:126: error: previous definition of 'bit' was here
./tpkg/cutest/cutest_bitset.c:133: error: 'for' loop initial declaration used outside C99 mode
./tpkg/cutest/cutest_bitset.c:141: error: redefinition of 'bit'
./tpkg/cutest/cutest_bitset.c:133: error: previous definition of 'bit' was here
./tpkg/cutest/cutest_bitset.c:141: error: 'for' loop initial declaration used outside C99 mode
@wcawijngaards
Copy link
Member

Thanks for the report.
Fixed it by moving declarations out of the loop.

@noloader
Copy link
Contributor Author

Thanks @wcawijngaards,

Sorry about these little reports. I know they can be annoying.

@wcawijngaards
Copy link
Member

No problem, also another fix in b2549e9 for cutest_event.c.

@noloader
Copy link
Contributor Author

Thanks @wcawijngaards

I just merged upstream/master. I'm seeing one more:

./tpkg/cutest/cutest_event.c: In function 'agent':
./tpkg/cutest/cutest_event.c:84: error: 'for' loop initial declaration used outside C99 mode
*** Error 1 in /home/jwalton/nsd (Makefile:316 'cutest_event.o')

@wcawijngaards
Copy link
Member

Aha, and a fix for that one too! Thanks.

@noloader
Copy link
Contributor Author

Perfect, its clean now.

I should have run a make -k from the onset...

@noloader
Copy link
Contributor Author

@wcawijngaards,

While I have your ear, does the project offer a tool to stress test the name server? Something like Apache's ab tool for name servers rather then web servers.

@wcawijngaards
Copy link
Member

NSD itself does not. You would need to get it from somewhere else. NSD is purposefully very minimal, to reduce bug footprint.

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

No branches or pull requests

2 participants