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

libssh: myards of warnings when compiling with libssh #6847

Closed
emilengler opened this issue Apr 4, 2021 · 0 comments
Closed

libssh: myards of warnings when compiling with libssh #6847

emilengler opened this issue Apr 4, 2021 · 0 comments
Labels

Comments

@emilengler
Copy link
Contributor

@emilengler emilengler commented Apr 4, 2021

I did this

Compiling curl with ./configure CC=clang --enable-debug --with-libssh --prefix=$HOME/tmp

vssh/libssh.c:706:47: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
        MOVE_TO_ERROR_STATE(CURLE_FAILED_INIT);
                                              ^
vssh/libssh.c:716:60: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
        MOVE_TO_ERROR_STATE(CURLE_PEER_FAILED_VERIFICATION);
                                                           ^
vssh/libssh.c:737:50: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
          MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
                                                 ^
vssh/libssh.c:755:50: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
          MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
                                                 ^
vssh/libssh.c:762:31: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
        MOVE_TO_SECONDARY_AUTH;
...

I expected the following

No warnings regarding unnecessary semicolons

curl/libcurl version

curl: f573998
libssh: 0.9.5

operating system

FreeBSD freebsd 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 GENERIC amd64

emilengler added a commit to emilengler/curl that referenced this issue Apr 4, 2021
This enforces the usage of semicolons when using CPP macros. We
currently use semicolons anyway, however this leads to certain warnings
on certain compilers.

Fixes curl#6847
emilengler added a commit to emilengler/curl that referenced this issue Apr 4, 2021
This enforces the usage of semicolons when using CPP macros. We
currently use semicolons anyway, however this leads to certain warnings
on certain compilers.

Fixes curl#6847
Closes curl#6848
@bagder bagder added the SCP/SFTP label Apr 5, 2021
emilengler added a commit to emilengler/curl that referenced this issue Apr 6, 2021
This enforces the usage of semicolons when using CPP macros. We
currently use semicolons anyway, however this leads to certain warnings
on certain compilers.

Fixes curl#6847
Closes curl#6848
emilengler added a commit to emilengler/curl that referenced this issue Apr 6, 2021
This enforces the usage of semicolons when using CPP macros. We
currently use semicolons anyway, however this leads to certain warnings
on certain compilers.

Fixes curl#6847
Closes curl#6848
bagder added a commit that referenced this issue Apr 17, 2021
... by fixing macros to do-while constructs and moving out the calls to
"break" outside of the actual macro. It also fixes the problem where the
macro was used witin a loop and the break didn't do right.

Reported-by: Emil Engler
Fixes #6847
@bagder bagder closed this in 2426fa4 Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants