Commit 761231d9 authored by 's avatar
Browse files

Fixed some warnings

git-svn-id: file:///home/svn/mapi/trunk@859 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent ebbb5200
......@@ -102,6 +102,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <mapi.h>
#include "acsmx2.h"
......@@ -134,7 +135,7 @@ typedef struct acsm_summary_s
/*
*
*/
static acsm_summary_t summary={};
static acsm_summary_t summary;
/*
** Case Translation Table
......@@ -1824,7 +1825,7 @@ acstate_t SparseGetNextStateNFA(acstate_t * ps, acstate_t state, int input)
* sparse and sparse-bands
*/
inline
acstate_t SparseGetNextStateDFA(acstate_t * ps, acstate_t state, int input)
acstate_t SparseGetNextStateDFA(acstate_t * ps, MAPI_UNUSED acstate_t state, int input)
{
acstate_t n, nb;
int index;
......
......@@ -259,7 +259,7 @@ flist_insert(flist_t *list, int id, void* data, int index)
if (index == 0)
return flist_prepend(list, id, data);
if ((unsigned int)index >= flist_size(list))
if (index >= flist_size(list))
return flist_append(list, id, data);
if ( (node = calloc(1,sizeof(flist_node_t))) == NULL )
......
......@@ -157,7 +157,10 @@ void *mapiipc_comm_thread(void *host) {
remote_flowdescr_t* rflow;
host_flow* hflow;
int recv_bytes;
#ifndef DIMAPISSL
int sockfd=((struct host *)host)->sockfd;
#endif
#ifdef DIMAPISSL
SSL *hostconn = ((struct host*)host)->con;
......
......@@ -34,7 +34,6 @@
//that is added.
#ifdef DIMAPISSL
static SSL_CTX *ctx;
struct overload{
SSL * connection;
int sock;
......
......@@ -45,6 +45,7 @@ int main() {
#ifdef DIMAPISSL
struct overload *inst;
SSL *con=NULL;
SSL_CTX *ctx;
OpenSSL_add_all_algorithms(); /* load & register all cryptos, etc. */
SSL_library_init();
SSL_load_error_strings();
......@@ -444,13 +445,14 @@ void *handle_request(void *arg) {
free(dbuf);
shutdown(sock, SHUT_RDWR);
close(sock);
#ifdef DIMAPISSL
if (SSL_shutdown(con) == -1)
ERR_print_errors_fp(stderr);
#endif
shutdown(sock, SHUT_RDWR);
close(sock);
/* update the global service counter */
//pthread_mutex_lock(&lock); DELETE
......
......@@ -234,7 +234,7 @@ static int bucket_client_read_result(mapidflib_function_instance_t *instance,map
return 0;
}
static int bucket_client_init(mapidflib_function_instance_t *instance, void* data)
static int bucket_client_init(MAPI_UNUSED mapidflib_function_instance_t *instance, MAPI_UNUSED void* data)
{
//done by mapi
return 0;
......
......@@ -46,8 +46,7 @@ static int startstop_instance(mapidflib_function_instance_t *instance,
if((!s1 || !s2) || (s1[0]=='+' && s2[0]!='+'))
return(MFUNCT_INVALID_ARGUMENT);
if(s1[0]!='+' && strptime(s1,"%Y-%m-%d %H:%M:%S",&t)==NULL
|| (s2[0]!='+' && strptime(s2,"%Y-%m-%d %H:%M:%S",&t)==NULL))
if( (s1[0]!='+' && strptime(s1,"%Y-%m-%d %H:%M:%S",&t)==NULL) || (s2[0]!='+' && strptime(s2,"%Y-%m-%d %H:%M:%S",&t)==NULL) )
return MFUNCT_INVALID_ARGUMENT;
return 0;
......
......@@ -15,7 +15,7 @@
#define WEB_COLOR 7
#define COWEB_COLOR 8
static int color;
//static int color;
struct vlan_802q_header {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment