diff options
Diffstat (limited to 'imap-send.c')
-rw-r--r-- | imap-send.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/imap-send.c b/imap-send.c index 06386e0b3b..f2e1947e63 100644 --- a/imap-send.c +++ b/imap-send.c @@ -18,13 +18,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, see <http://www.gnu.org/licenses/>. + * along with this program; if not, see <https://www.gnu.org/licenses/>. */ #include "git-compat-util.h" #include "config.h" #include "credential.h" -#include "exec-cmd.h" #include "gettext.h" #include "run-command.h" #include "parse-options.h" @@ -206,10 +205,14 @@ static void socket_perror(const char *func, struct imap_socket *sock, int ret) else fprintf(stderr, "%s: unexpected EOF\n", func); } + /* mark as used to appease -Wunused-parameter with NO_OPENSSL */ + (void)sock; } #ifdef NO_OPENSSL -static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int verify) +static int ssl_socket_connect(struct imap_socket *sock UNUSED, + int use_tls_only UNUSED, + int verify UNUSED) { fprintf(stderr, "SSL requested but SSL support not compiled in\n"); return -1; @@ -856,7 +859,7 @@ static void imap_close_store(struct imap_store *ctx) /* * hexchar() and cram() functions are based on the code from the isync - * project (http://isync.sf.net/). + * project (https://isync.sourceforge.io/). */ static char hexchar(unsigned int b) { @@ -904,7 +907,9 @@ static char *cram(const char *challenge_64, const char *user, const char *pass) #else -static char *cram(const char *challenge_64, const char *user, const char *pass) +static char *cram(const char *challenge_64 UNUSED, + const char *user UNUSED, + const char *pass UNUSED) { die("If you want to use CRAM-MD5 authenticate method, " "you have to build git-imap-send with OpenSSL library."); @@ -1340,7 +1345,7 @@ static int git_imap_config(const char *var, const char *val, server.port = git_config_int(var, val, ctx->kvi); else if (!strcmp("imap.host", var)) { if (!val) { - git_die_config("imap.host", "Missing value for 'imap.host'"); + return config_error_nonbool(var); } else { if (starts_with(val, "imap:")) val += 5; |