Commit 16eca057 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

More warning eliminations.

parent e7f0fdd9
......@@ -466,7 +466,7 @@ if test "$enable_warn" != "no"; then
# We will do this by hand instead and only default to the macro for unknown compilers
case "$ax_cv_c_compiler_vendor" in
gnu | clang)
CFLAGS="$CFLAGS -Wall"
CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter"
;;
intel)
CFLAGS="$CFLAGS -w2 -Wunused-variable"
......
......@@ -2862,7 +2862,7 @@ void DOSUB_SUBSET(struct runner *r, struct cell *ci, struct part *parts,
}
/* Get the sorting index. */
int sid = 0;
int new_sid = 0;
for (int k = 0; k < 3; k++)
new_sid = 3 * new_sid +
((cj->loc[k] - ci->loc[k] + shift[k] < 0)
......
......@@ -179,7 +179,7 @@ void readArray(hid_t grp, const struct io_props props, size_t N,
void prepareArray(struct engine* e, hid_t grp, char* fileName, FILE* xmfFile,
char* partTypeGroupName, const struct io_props props,
long long N_total, const struct UnitSystem* internal_units,
unsigned long long N_total, const struct UnitSystem* internal_units,
const struct UnitSystem* snapshot_units) {
/* Create data space */
......
......@@ -707,7 +707,7 @@ void space_parts_sort(struct space *s, int *ind, size_t N, int min, int max,
if ((sort_struct.stack =
malloc(sizeof(struct qstack) * sort_struct.stack_size)) == NULL)
error("Failed to allocate sorting stack.");
for (int i = 0; i < sort_struct.stack_size; i++)
for (unsigned int i = 0; i < sort_struct.stack_size; i++)
sort_struct.stack[i].ready = 0;
/* Add the first interval. */
......@@ -892,7 +892,7 @@ void space_gparts_sort(struct space *s, int *ind, size_t N, int min, int max,
if ((sort_struct.stack =
malloc(sizeof(struct qstack) * sort_struct.stack_size)) == NULL)
error("Failed to allocate sorting stack.");
for (int i = 0; i < sort_struct.stack_size; i++)
for (unsigned int i = 0; i < sort_struct.stack_size; i++)
sort_struct.stack[i].ready = 0;
/* Add the first interval. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment