Fix clang warnings in applications
Some fd would be used uninitialized if we goto exit early.
This commit is contained in:
parent
a97c015f89
commit
68821da01e
3 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ static void my_debug( void *ctx, int level, const char *str )
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int ret, len, server_fd;
|
int ret, len, server_fd = -1;
|
||||||
unsigned char buf[1024];
|
unsigned char buf[1024];
|
||||||
const char *pers = "ssl_client1";
|
const char *pers = "ssl_client1";
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int ret, len, cnt = 0, pid;
|
int ret, len, cnt = 0, pid;
|
||||||
int listen_fd;
|
int listen_fd;
|
||||||
int client_fd;
|
int client_fd = -1;
|
||||||
unsigned char buf[1024];
|
unsigned char buf[1024];
|
||||||
const char *pers = "ssl_fork_server";
|
const char *pers = "ssl_fork_server";
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ static void my_debug( void *ctx, int level, const char *str )
|
||||||
static int ssl_test( struct options *opt )
|
static int ssl_test( struct options *opt )
|
||||||
{
|
{
|
||||||
int ret, i;
|
int ret, i;
|
||||||
int client_fd;
|
int client_fd = -1;
|
||||||
int bytes_to_read;
|
int bytes_to_read;
|
||||||
int bytes_to_write;
|
int bytes_to_write;
|
||||||
int offset_to_read = 0;
|
int offset_to_read = 0;
|
||||||
|
|
Loading…
Reference in a new issue