Skip to content

Commit

Permalink
Fix various compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
mittinatten committed Sep 9, 2023
1 parent ae84194 commit 98690ef
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ run_analysis(std::vector<freesasa_structure *> structures,
for (auto structure : structures) {
strcpy(name_i, name);
if (structures.size() > 1 && (state->structure_options & FREESASA_SEPARATE_MODELS))
sprintf(name_i + strlen(name_i), ":%d", freesasa_structure_model(structure));
snprintf(name_i + strlen(name_i), 9, ":%d", freesasa_structure_model(structure));

tmp_tree = freesasa_calc_tree(structure, &state->parameters, name_i);
if (tmp_tree == NULL) abort_msg("can't calculate SASA");
Expand Down
6 changes: 3 additions & 3 deletions src/structure.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ atom_free(struct atom *a)
}

struct atoms
atoms_init()
atoms_init(void)
{
struct atoms atoms;
atoms.n = 0;
Expand Down Expand Up @@ -237,7 +237,7 @@ atom_new_from_line(const char *line,
}

static struct residues
residues_init()
residues_init(void)
{
struct residues res;

Expand Down Expand Up @@ -301,7 +301,7 @@ residues_dealloc(struct residues *residues)
}

static struct chains
chains_init()
chains_init(void)
{
struct chains ch;

Expand Down
4 changes: 2 additions & 2 deletions tests/test_classifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ START_TEST(test_memerr)
END_TEST


extern TCase *test_classifier_static();
extern TCase *test_classifier_static(void);

Suite *classifier_suite()
Suite *classifier_suite(void)
{
Suite *s = suite_create("Classify");
TCase *tc_core = tcase_create("Core");
Expand Down
2 changes: 1 addition & 1 deletion tests/test_coord.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ START_TEST(test_memerr)
}
END_TEST

Suite *coord_suite()
Suite *coord_suite(void)
{
Suite *s = suite_create("Coord");
TCase *tc_core = tcase_create("Core");
Expand Down
4 changes: 2 additions & 2 deletions tests/test_freesasa.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,9 @@ START_TEST(test_memerr)
}
END_TEST

extern TCase *test_LR_static();
extern TCase *test_LR_static(void);

Suite *sasa_suite()
Suite *sasa_suite(void)
{
Suite *s = suite_create("SASA-calculation");

Expand Down
2 changes: 1 addition & 1 deletion tests/test_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ START_TEST(test_json)
}
END_TEST

Suite *json_suite()
Suite *json_suite(void)
{
Suite *s = suite_create("JSON");
TCase *tc_core = tcase_create("Core");
Expand Down
20 changes: 10 additions & 10 deletions tests/test_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
#include <config.h>
#endif

extern Suite *pdb_suite();
extern Suite *classifier_suite();
extern Suite *coord_suite();
extern Suite *structure_suite();
extern Suite *sasa_suite();
extern Suite *nb_suite();
extern Suite *selector_suite();
extern Suite *result_node_suite();
extern Suite *pdb_suite(void);
extern Suite *classifier_suite(void);
extern Suite *coord_suite(void);
extern Suite *structure_suite(void);
extern Suite *sasa_suite(void);
extern Suite *nb_suite(void);
extern Suite *selector_suite(void);
extern Suite *result_node_suite(void);

#ifdef USE_JSON
extern Suite *json_suite();
extern Suite *json_suite(void);
#endif
#ifdef USE_XML
extern Suite *xml_suite();
extern Suite *xml_suite(void);
#endif

int main(int argc, char **argv)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_nb.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ START_TEST(test_memerr)
}
END_TEST

extern TCase *test_nb_static();
extern TCase *test_nb_static(void);

Suite *nb_suite()
Suite *nb_suite(void)
{
Suite *s = suite_create("Neighbor lists");

Expand Down
2 changes: 1 addition & 1 deletion tests/test_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ START_TEST(test_memerr)
}
END_TEST

Suite *result_node_suite()
Suite *result_node_suite(void)
{
Suite *s = suite_create("Result-node");

Expand Down
4 changes: 2 additions & 2 deletions tests/test_pdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ START_TEST(test_get_chains)
}
END_TEST

extern TCase *test_pdb_static();
extern TCase *test_pdb_static(void);

Suite *pdb_suite()
Suite *pdb_suite(void)
{
Suite *s = suite_create("PDB-parser");
TCase *tc_core = tcase_create("Core");
Expand Down
4 changes: 2 additions & 2 deletions tests/test_selection.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,9 @@ START_TEST(test_memerr)
}
END_TEST

extern TCase *test_selection_static();
extern TCase *test_selection_static(void);

Suite *selector_suite()
Suite *selector_suite(void)
{
Suite *s = suite_create("Selector");

Expand Down
2 changes: 1 addition & 1 deletion tests/test_structure.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ START_TEST(test_memerr)
}
END_TEST

Suite *structure_suite()
Suite *structure_suite(void)
{
// what goes in what Case is kind of arbitrary
Suite *s = suite_create("Structure");
Expand Down
2 changes: 1 addition & 1 deletion tests/test_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ START_TEST(test_memerr)
}
END_TEST

Suite *xml_suite()
Suite *xml_suite(void)
{
Suite *s = suite_create("XML");
TCase *tc_core = tcase_create("Core");
Expand Down

0 comments on commit 98690ef

Please sign in to comment.