Skip to content

Commit 9a7cd35

Browse files
committed
Minor stub cleanup
1 parent 4aa8df5 commit 9a7cd35

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/postgresql_stubs.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ static inline void free_binary_params(int *formats, int *lengths)
584584
}
585585

586586
static inline Oid * copy_param_types(
587-
value v_param_types, size_t nparams, size_t nparam_types)
587+
value v_param_types, size_t nparams, size_t nparam_types)
588588
{
589589
Oid *param_types;
590590
size_t i;
@@ -595,8 +595,8 @@ static inline Oid * copy_param_types(
595595
value v_param_type = Field(v_param_types, i);
596596
param_types[i] = Int_val(v_param_type);
597597
}
598-
memset(param_types + nparam_types, 0,
599-
(nparams - nparam_types) * sizeof(Oid));
598+
memset(
599+
param_types + nparam_types, 0, (nparams - nparam_types) * sizeof(Oid));
600600
return param_types;
601601
}
602602

@@ -680,9 +680,8 @@ CAMLprim value PQexecParams_stub(
680680
CAMLreturn(alloc_result(res, np_cb));
681681
}
682682

683-
CAMLprim value PQexecParams_stub_bc(value *argv, int argn)
683+
CAMLprim value PQexecParams_stub_bc(value *argv, int __unused argn)
684684
{
685-
(void)argn; /* unused */
686685
return
687686
PQexecParams_stub(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
688687
}
@@ -1033,8 +1032,7 @@ CAMLprim intnat PQsendPrepare_stub(
10331032
const char *query = String_val(v_query);
10341033
size_t nparams = Wosize_val(v_param_types);
10351034
Oid *param_types = copy_param_types(v_param_types, nparams, nparams);
1036-
intnat res;
1037-
res = PQsendPrepare(conn, stm_name, query, nparams, param_types);
1035+
intnat res = PQsendPrepare(conn, stm_name, query, nparams, param_types);
10381036
if (param_types != NULL) caml_stat_free(param_types);
10391037
return res;
10401038
}

0 commit comments

Comments
 (0)