summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile32
-rw-r--r--src/irc/irc.c21
-rw-r--r--src/irc/irc_handle_connected.c8
-rw-r--r--src/irc/irc_handle_dcc_events.c12
-rw-r--r--src/irc/irc_receive.c8
-rw-r--r--src/main.c2
-rw-r--r--src/meta_net/meta_net.h2
-rw-r--r--src/meta_net/meta_net_handle_reply.c5
-rw-r--r--src/meta_net/meta_net_select.c2
-rw-r--r--src/parameters/parameters.h6
-rw-r--r--src/parameters/parameters_getters.c6
11 files changed, 34 insertions, 70 deletions
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 719b8ea..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-SUBCOMPONENTS = $(dir $(filter-out "./Makefile",$(wildcard ./*/Makefile)))
-SUBCOMPONENTS_EXPORT = $(addsuffix /export.a,$(SUBCOMPONENTS))
-################################################################################
-SRC_FILES = $(wildcard ./*.c)
-OBJ_FILES = $(SRC_FILES:.c=.o)
-DEP_FILES = $(SRC_FILES:.c=.d)
-################################################################################
-build: export.a
-
-export.a: $(OBJ_FILES) $(SUBCOMPONENTS_EXPORT)
- ar -crT $@ $^
-
-$(SUBCOMPONENTS_EXPORT): .JUST_CHECK
- $(MAKE) -C $(dir $@) export.a
-
-clean:
- rm -f $(OBJ_FILES)
- rm -f $(DEP_FILES)
- rm -f export.a
- for subcmp in $(SUBCOMPONENTS) ; do \
- $(MAKE) -C $$subcmp clean ; \
- done
-################################################################################
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-.JUST_CHECK:
-
-include $(DEP_FILES)
diff --git a/src/irc/irc.c b/src/irc/irc.c
index 5d2aba4..7407ed3 100644
--- a/src/irc/irc.c
+++ b/src/irc/irc.c
@@ -115,18 +115,21 @@ int JH_irc_connect (struct JH_irc irc [const restrict static 1])
return 0;
}
-void JH_irc_finalize (struct JH_irc irc [const restrict static 1])
+void JH_irc_finalize
+(
+ __attribute__((unused)) struct JH_irc irc [const restrict static 1]
+)
{
/* TODO */
}
void JH_irc_do_nothing
(
- irc_session_t * session,
- const char * event,
- const char * origin,
- const char ** params,
- unsigned int count
+ __attribute__((unused)) irc_session_t * session,
+ __attribute__((unused)) const char * event,
+ __attribute__((unused)) const char * origin,
+ __attribute__((unused)) const char ** params,
+ __attribute__((unused)) unsigned int count
)
{
}
@@ -135,9 +138,9 @@ void JH_irc_handle_numeric_event
(
irc_session_t * session,
unsigned int event,
- const char * origin,
- const char ** params,
- unsigned int count
+ __attribute__((unused)) const char * origin,
+ __attribute__((unused)) const char ** params,
+ __attribute__((unused)) unsigned int count
)
{
struct JH_irc * irc;
diff --git a/src/irc/irc_handle_connected.c b/src/irc/irc_handle_connected.c
index b797d91..a0b8ccf 100644
--- a/src/irc/irc_handle_connected.c
+++ b/src/irc/irc_handle_connected.c
@@ -10,10 +10,10 @@
void JH_irc_handle_connected_event
(
irc_session_t * session,
- const char * event,
- const char * origin,
- const char ** params,
- unsigned int count
+ __attribute__((unused)) const char * event,
+ __attribute__((unused)) const char * origin,
+ __attribute__((unused)) const char ** params,
+ __attribute__((unused)) unsigned int count
)
{
struct JH_irc * irc;
diff --git a/src/irc/irc_handle_dcc_events.c b/src/irc/irc_handle_dcc_events.c
index 2fe6904..f78b392 100644
--- a/src/irc/irc_handle_dcc_events.c
+++ b/src/irc/irc_handle_dcc_events.c
@@ -5,8 +5,8 @@
void JH_irc_handle_dcc_chat_req_event
(
irc_session_t * session,
- const char * nick,
- const char * addr,
+ __attribute__((unused)) const char * nick,
+ __attribute__((unused)) const char * addr,
irc_dcc_t dccid
)
{
@@ -16,10 +16,10 @@ void JH_irc_handle_dcc_chat_req_event
void JH_irc_handle_dcc_send_req_event
(
irc_session_t * session,
- const char * nick,
- const char * addr,
- const char * filename,
- unsigned long size,
+ __attribute__((unused)) const char * nick,
+ __attribute__((unused)) const char * addr,
+ __attribute__((unused)) const char * filename,
+ __attribute__((unused)) unsigned long size,
irc_dcc_t dccid
)
{
diff --git a/src/irc/irc_receive.c b/src/irc/irc_receive.c
index 64804e3..aad93e2 100644
--- a/src/irc/irc_receive.c
+++ b/src/irc/irc_receive.c
@@ -12,10 +12,10 @@
void JH_irc_handle_channel_message_event
(
irc_session_t * session,
- const char * event,
+ __attribute__((unused)) const char * event,
const char * origin,
const char ** params,
- unsigned int count
+ __attribute__((unused)) unsigned int count
)
{
struct JH_irc * irc;
@@ -43,10 +43,10 @@ void JH_irc_handle_channel_message_event
void JH_irc_handle_ctcp_action_event
(
irc_session_t * session,
- const char * event,
+ __attribute__((unused)) const char * event,
const char * origin,
const char ** params,
- unsigned int count
+ __attribute__((unused)) unsigned int count
)
{
struct JH_irc * irc;
diff --git a/src/main.c b/src/main.c
index dcb8a66..103330f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -133,7 +133,6 @@ static int event_handling_loop
JH_meta_net_pre_select
(
socket,
- params,
&in_set,
&out_set,
&fd_max
@@ -212,7 +211,6 @@ static int event_handling_loop
JH_meta_net_post_select
(
socket,
- params,
&in_set,
&out_set
) < 0
diff --git a/src/meta_net/meta_net.h b/src/meta_net/meta_net.h
index 0673f74..6f51964 100644
--- a/src/meta_net/meta_net.h
+++ b/src/meta_net/meta_net.h
@@ -64,7 +64,6 @@ void JH_meta_net_handle_reply
int JH_meta_net_pre_select
(
struct JH_meta_net socket [const restrict static 1],
- const struct JH_parameters params [const restrict static 1],
fd_set in [const restrict static 1],
fd_set out [const restrict static 1],
int max_fd [const restrict static 1]
@@ -73,7 +72,6 @@ int JH_meta_net_pre_select
int JH_meta_net_post_select
(
struct JH_meta_net socket [const restrict static 1],
- const struct JH_parameters params [const restrict static 1],
fd_set in [const restrict static 1],
fd_set out [const restrict static 1]
);
diff --git a/src/meta_net/meta_net_handle_reply.c b/src/meta_net/meta_net_handle_reply.c
index 83ee654..6e2ff60 100644
--- a/src/meta_net/meta_net_handle_reply.c
+++ b/src/meta_net/meta_net_handle_reply.c
@@ -8,8 +8,7 @@
static void handle_generated_reply
(
struct JH_meta_net socket [const restrict static 1],
- struct JH_irc irc [const restrict static 1],
- const struct JH_parameters params [const restrict static 1]
+ struct JH_irc irc [const restrict static 1]
)
{
if
@@ -169,7 +168,7 @@ void JH_meta_net_handle_reply
)
)
{
- handle_generated_reply(socket, irc, params);
+ handle_generated_reply(socket, irc);
}
else if
(
diff --git a/src/meta_net/meta_net_select.c b/src/meta_net/meta_net_select.c
index f126176..7107d86 100644
--- a/src/meta_net/meta_net_select.c
+++ b/src/meta_net/meta_net_select.c
@@ -6,7 +6,6 @@
int JH_meta_net_pre_select
(
struct JH_meta_net socket [const restrict static 1],
- const struct JH_parameters params [const restrict static 1],
fd_set in [const restrict static 1],
fd_set out [const restrict static 1],
int max_fd [const restrict static 1]
@@ -30,7 +29,6 @@ int JH_meta_net_pre_select
int JH_meta_net_post_select
(
struct JH_meta_net socket [const restrict static 1],
- const struct JH_parameters params [const restrict static 1],
fd_set in [const restrict static 1],
fd_set out [const restrict static 1]
)
diff --git a/src/parameters/parameters.h b/src/parameters/parameters.h
index 14c1dc1..bf78a6b 100644
--- a/src/parameters/parameters.h
+++ b/src/parameters/parameters.h
@@ -10,17 +10,17 @@ int JH_parameters_initialize
const char * argv [const static argc]
);
-const int JH_parameters_get_request_pipelining
+int JH_parameters_get_request_pipelining
(
const struct JH_parameters param [const restrict static 1]
);
-const int JH_parameters_get_print_additional_info
+int JH_parameters_get_print_additional_info
(
const struct JH_parameters param [const restrict static 1]
);
-const int JH_parameters_get_print_chat
+int JH_parameters_get_print_chat
(
const struct JH_parameters param [const restrict static 1]
);
diff --git a/src/parameters/parameters_getters.c b/src/parameters/parameters_getters.c
index 868a059..8a7907b 100644
--- a/src/parameters/parameters_getters.c
+++ b/src/parameters/parameters_getters.c
@@ -1,6 +1,6 @@
#include "parameters.h"
-const int JH_parameters_get_request_pipelining
+int JH_parameters_get_request_pipelining
(
const struct JH_parameters param [const restrict static 1]
)
@@ -8,7 +8,7 @@ const int JH_parameters_get_request_pipelining
return param->request_pipelining;
}
-const int JH_parameters_get_print_additional_info
+int JH_parameters_get_print_additional_info
(
const struct JH_parameters param [const restrict static 1]
)
@@ -16,7 +16,7 @@ const int JH_parameters_get_print_additional_info
return param->print_additional_info;
}
-const int JH_parameters_get_print_chat
+int JH_parameters_get_print_chat
(
const struct JH_parameters param [const restrict static 1]
)