Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Do not show unused parameter warning.

  • Loading branch information...
commit 68efd0b26d121752deeaee7e9693ec11c18ab2a2 1 parent 686b175
@residuum authored
Showing with 36 additions and 2 deletions.
  1. +10 −1 json-decode.c
  2. +15 −0 json-encode.c
  3. +1 −1  purest_json.h
  4. +10 −0 rest-json.c
View
11 json-decode.c
@@ -12,6 +12,11 @@ void setup_json0x2ddecode(void) {
void *json_decode_new(t_symbol *selector, int argcount, t_atom *argvec) {
t_json_decode *x = (t_json_decode*)pd_new(json_decode_class);
+
+ (void) selector;
+ (void) argcount;
+ (void) argvec;
+
outlet_new(&x->x_ob, NULL);
x->done_outlet = outlet_new(&x->x_ob, &s_bang);
return (void *)x;
@@ -25,12 +30,16 @@ void json_decode_list(t_json_decode *x, t_symbol *selector, int argcount, t_atom
char json_string[MAX_STRING_SIZE];
char value[MAX_STRING_SIZE];
int i;
+
+ (void) selector;
+
+
if (argcount > 1) {
atom_string(argvec + 1, json_string, MAX_STRING_SIZE);
for (i = 2; i < argcount; i++) {
atom_string(argvec + i, value, MAX_STRING_SIZE);
strcat(json_string, value);
}
- output_json_string(*json_string, x->x_ob.ob_outlet, x->done_outlet);
+ output_json_string(json_string, x->x_ob.ob_outlet, x->done_outlet);
}
}
View
15 json-encode.c
@@ -14,6 +14,11 @@ void setup_json0x2dencode(void) {
void *json_encode_new(t_symbol *selector, int argcount, t_atom *argvec) {
t_json_encode *x = (t_json_encode*)pd_new(json_encode_class);
+
+ (void) selector;
+ (void) argcount;
+ (void) argvec;
+
x->data_count = 0;
outlet_new(&x->x_ob, NULL);
return (void *)x;
@@ -79,6 +84,9 @@ void json_encode_add(t_json_encode *x, t_symbol *selector, int argcount, t_atom
char key[MAX_STRING_SIZE];
char value[MAX_STRING_SIZE];
int i;
+
+ (void) selector;
+
if (argcount < 2) {
error("For method 'add' You need to specify a value.");
} else {
@@ -100,6 +108,9 @@ void json_encode_array_add(t_json_encode *x, t_symbol *selector, int argcount, t
char key[MAX_STRING_SIZE];
char value[MAX_STRING_SIZE];
int i;
+
+ (void) selector;
+
if (argcount < 2) {
error("For method 'array' You need to specify a value.");
} else {
@@ -118,5 +129,9 @@ void json_encode_array_add(t_json_encode *x, t_symbol *selector, int argcount, t
}
void json_encode_clear(t_json_encode *x, t_symbol *selector, int argcount, t_atom *argvec) {
+ (void) selector;
+ (void) argcount;
+ (void) argvec;
+
x->data_count = 0;
}
View
2  purest_json.h
@@ -30,7 +30,7 @@ typedef struct rest {
char base_url[MAX_STRING_SIZE];
t_atom out[MAX_ARRAY_SIZE];
/* Used for threading */
- char request_type[6]; /*One of GET, PUT, POST; DELETE*/
+ char request_type[7]; /*One of GET, PUT, POST; DELETE*/
char parameters[MAX_STRING_SIZE];
char complete_url[MAX_STRING_SIZE];
short is_data_locked;
View
10 rest-json.c
@@ -73,9 +73,17 @@ void rest_command(t_rest *x, t_symbol *selector, int argcount, t_atom *argvec) {
void rest_oauth(t_rest *x, t_symbol *selector, int argcount, t_atom *argvec) {
error("OAUTH not implemented yet.");
+
+ (void) x;
+ (void) selector;
+ (void) argcount;
+ (void) argvec;
}
void rest_url(t_rest *x, t_symbol *selector, int argcount, t_atom *argvec) {
+
+ (void) selector;
+
if(x->is_data_locked) {
post("rest-json object is performing request and locked");
} else {
@@ -99,6 +107,8 @@ void rest_url(t_rest *x, t_symbol *selector, int argcount, t_atom *argvec) {
void *rest_new(t_symbol *selector, int argcount, t_atom *argvec) {
t_rest *x = (t_rest *)pd_new(rest_class);
+ (void) selector;
+
switch (argcount) {
case 1:
if (argvec[0].a_type != A_SYMBOL) {
Please sign in to comment.
Something went wrong with that request. Please try again.