Re: [PATCH] imap-send.c: fix pointer to be const
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2009, 06:26 UTC
- Message-ID
- <7vk4ygxce6.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1256706591-2763-1-git-send-email-vietor@vxwo.org>
Vietor Liu <vietor@vxwo.org> writes:
Show 5 quoted lines
> Fixes some compiler warnings: > imap-send.c: In function ‘ssl_socket_connect’: > warning: assignment discards qualifiers from pointer target type > > Signed-off-by: Vietor Liu <vietor@vxwo.org>
I do not quite understand. This variable gets assigned the return values from TLSv1_method() or SSLv23_method(), but the copy of ssl.h I have declares them as:
SSL_METHOD *SSLv23_method(void); /* SSLv3 but can rollback to v2 */
SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */We would need to explain this change a bit better.
Show 18 quoted lines
> imap-send.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/imap-send.c b/imap-send.c > index 3847fd1..10dd025 100644 > --- a/imap-send.c > +++ b/imap-send.c > @@ -273,7 +273,7 @@ static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int ve > fprintf(stderr, "SSL requested but SSL support not compiled in\n"); > return -1; > #else > - SSL_METHOD *meth; > + const SSL_METHOD *meth; > SSL_CTX *ctx; > int ret; > > -- > 1.6.5.2