Skip to content

Commit ce60140

Browse files
authored
Merge pull request #339 from jajik/fix-warnings
Fix compile warnings on clang and includes + minor tweaks
2 parents 7db41f8 + a1f0704 commit ce60140

12 files changed

Lines changed: 18 additions & 39 deletions

File tree

native/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ IF(WIN32)
1313
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /O2 /Wall /Z7")
1414
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Od /Wall /Zi")
1515
ELSE()
16-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=gnu99 -fPIC -Wall -Wextra")
16+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=gnu99 -fPIC -Wall -Wextra -Werror")
1717
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -p -O1 -std=gnu99 -fPIC -Wall -Wextra")
1818
ENDIF()
1919

native/advertise/mod_advertise.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ static void advertise_info(request_rec *r)
706706
/* List of directives specific to our module. */
707707
/* */
708708
/*--------------------------------------------------------------------------*/
709+
/* clang-format off */
709710
static const command_rec cmd_table[] = {
710711
AP_INIT_TAKE12("ServerAdvertise", /* directive name */
711712
cmd_advertise_m, /* config action routine */
@@ -737,9 +738,9 @@ static const command_rec cmd_table[] = {
737738
NULL, /* argument to include in call */
738739
RSRC_CONF, /* where available */
739740
"Local adress to bind to for Multicast logic"),
740-
{NULL},
741-
741+
{.name = NULL},
742742
};
743+
/* clang-format on */
743744

744745
/*--------------------------------------------------------------------------*/
745746
/* */

native/balancers/mod_lbmethod_cluster.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,14 +445,17 @@ static const char *cmd_proxyhctemplate(cmd_parms *cmd, void *dummy, const char *
445445
return NULL;
446446
}
447447

448+
/* clang-format off */
448449
static const command_rec lbmethod_cmds[] = {
449450
AP_INIT_FLAG("UseNocanon", cmd_nocanon, NULL, OR_ALL,
450451
"UseNocanon - When no ProxyPass or ProxyMatch for the URL, passes the URL path \"raw\" to the backend "
451452
"(Default: Off)"),
452453
AP_INIT_RAW_ARGS(
453454
"ModProxyClusterHCTemplate", cmd_proxyhctemplate, NULL, OR_ALL,
454455
"ModProxyClusterHCTemplate - Set of health check parameters to use with mod_lbmethod_cluster workers."),
455-
{NULL}};
456+
{.name = NULL}
457+
};
458+
/* clang-format on */
456459

457460
static void register_hooks(apr_pool_t *p)
458461
{

native/include/balancer.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ struct balancerinfo
4545
};
4646
typedef struct balancerinfo balancerinfo_t;
4747

48-
/**
49-
* Use apache httpd structure
50-
*/
51-
typedef struct ap_slotmem_provider_t slotmem_storage_method;
52-
5348
/**
5449
* Insert(alloc) and update a balancer record in the shared table
5550
* @param s pointer to the shared table

native/include/context.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ struct contextinfo
5050
};
5151
typedef struct contextinfo contextinfo_t;
5252

53-
/**
54-
* Use apache httpd structure
55-
*/
56-
typedef struct ap_slotmem_provider_t slotmem_storage_method;
57-
5853
/**
5954
* Insert(alloc) and update a context record in the shared table
6055
* @param s pointer to the shared table

native/include/domain.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ struct domaininfo
4040
};
4141
typedef struct domaininfo domaininfo_t;
4242

43-
/**
44-
* Use apache httpd structure
45-
*/
46-
typedef struct ap_slotmem_provider_t slotmem_storage_method;
47-
4843
/**
4944
* Insert(alloc) and update a domain record in the shared table
5045
* @param s pointer to the shared table

native/include/host.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ struct hostinfo
4040
};
4141
typedef struct hostinfo hostinfo_t;
4242

43-
/**
44-
* Use apache httpd structure
45-
*/
46-
typedef struct ap_slotmem_provider_t slotmem_storage_method;
47-
4843
/**
4944
* Insert(alloc) and update a host record in the shared table
5045
* @param s pointer to the shared table

native/include/mod_clustersize.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
#error "PROXY_WORKER_MAX_ROUTE_SIZE is not defined"
1616
#endif
1717

18+
/**
19+
* Use apache httpd structure
20+
*/
21+
typedef struct ap_slotmem_provider_t slotmem_storage_method;
22+
1823
/* For host.h */
1924
#define HOSTALIASZ 255
2025

native/include/node.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ struct nodeinfo
8181
};
8282
typedef struct nodeinfo nodeinfo_t;
8383

84-
/**
85-
* Use apache httpd structure
86-
*/
87-
typedef struct ap_slotmem_provider_t slotmem_storage_method;
88-
8984
/**
9085
* Return the last stored in the mem structure
9186
* @param pointer to the shared table

native/include/sessionid.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ struct sessionidinfo
3939
};
4040
typedef struct sessionidinfo sessionidinfo_t;
4141

42-
/**
43-
* Use apache httpd structure
44-
*/
45-
typedef struct ap_slotmem_provider_t slotmem_storage_method;
46-
4742
/**
4843
* Insert(alloc) and update a sessionid record in the shared table
4944
* @param s pointer to the shared table

0 commit comments

Comments
 (0)