Skip to content

Commit ef190f4

Browse files
Merge pull request #1982 from dutkalex/fix-warnings
Improvement: fix clang warnings
2 parents 4a06e41 + e43d6c5 commit ef190f4

27 files changed

+186
-175
lines changed

benchmarks/t8_time_fractal.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ main (int argc, char **argv)
455455
}
456456
else if (parsed >= 0 && level_initial >= 0 && level_initial < level_end && (iterative == 0 || iterative == 1)
457457
&& (remove == 0 || remove == 1) && (output == 0 || output == 1) && coarse >= 0 && trees > 0
458-
&& (eclass_int > 1 || eclass_int < 8) && runs > 0) {
458+
&& (eclass_int > 1 && eclass_int < 8) && runs > 0) {
459459
t8_construct_fractal (level_initial, level_end, iterative, remove, trees, (t8_eclass_t) eclass_int, output, coarse,
460460
runs);
461461
}

example/IO/forest/netcdf/t8_write_forest_netcdf.cxx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct t8_example_netcdf_adapt_data
6060
};
6161

6262
/** This functions describe an adapt_function, an adapt_function describes the refinement/coarsening rules for a forest
63-
* \note If an element is inside a given radius from the midpoint of the hypercube, this element is refined. If a family of elements is outside a given radius from the midpoint of the hypercube, it is coarsened.
63+
* \note If an element is inside a given radius from the midpoint of the hypercube, this element is refined. If a family of elements is outside a given radius from the midpoint of the hypercube, it is coarsened.
6464
* \note A detailed description of the adaption process is found in step 3 of the tutorial located in 't8code/example/tutorials'.
6565
*/
6666
int
@@ -99,7 +99,7 @@ t8_example_netcdf_adapt_fn (t8_forest_t forest, t8_forest_t forest_from, t8_loci
9999
}
100100
}
101101

102-
/** This functions performs the adaption process of a forest and returns the adapted forest
102+
/** This functions performs the adaption process of a forest and returns the adapted forest
103103
* \param [in] forest The forest which ought to be adapted
104104
* \param [out] forest_adapt The adapted forest
105105
* \note A detailed description of the adaption process is found in step 3 of the tutorial located in 't8code/example/tutorials'.
@@ -122,7 +122,7 @@ t8_example_netcdf_adapt (t8_forest_t forest)
122122
return forest_adapt;
123123
}
124124

125-
/** Function that times the duration of writing out the netCDF File, given a specific variable storage and access pattern
125+
/** Function that times the duration of writing out the netCDF File, given a specific variable storage and access pattern
126126
* \param [in] forest The forest to save in a netCDF file (using UGRID conventions).
127127
* \param [in] comm The MPI communicator to use.
128128
* \param [in] netcdf_var_storage_mode Choose if chunked or contiguous storage should be used (possible Options: NC_CONTIGUOUS, NC_CHUNKED).
@@ -162,7 +162,7 @@ t8_example_time_netcdf_writing_operation ([[maybe_unused]] t8_forest_t forest, [
162162
#endif
163163
}
164164

165-
/** Function that stores the given (uniform) forest in a netCDF-4 File using the different netCDF variable storage and mpi-access patterns (four files are going to be put out (each combination of {NC_CONTIGUOUS; NC_CHUNKED}x{NC_INDEPENDENT; NC_COLLECTIVE})).
165+
/** Function that stores the given (uniform) forest in a netCDF-4 File using the different netCDF variable storage and mpi-access patterns (four files are going to be put out (each combination of {NC_CONTIGUOUS; NC_CHUNKED}x{NC_INDEPENDENT; NC_COLLECTIVE})).
166166
* \param [in] comm The MPI communicator to use.
167167
* \param [in] forest_refinement_level The refinement level of the forest.
168168
* \param [in] adapt_forest A flag whether an adapt step should be performed (=1) or not (=0).
@@ -203,7 +203,7 @@ t8_example_compare_performance_netcdf_var_properties (sc_MPI_Comm comm, int fore
203203
forest = t8_example_netcdf_adapt (forest);
204204
}
205205
num_elements = t8_forest_get_local_num_leaf_elements (forest);
206-
t8_productionf ("Number of process-local elements: %ld\n", static_cast<long> (num_elements));
206+
t8_productionf ("Number of process-local elements: %" T8_GLOIDX_FORMAT "\n", num_elements);
207207

208208
/* If additional data should be written to the netCDF file, the two variables are created in the following section */
209209
if (with_additional_data) {
@@ -243,8 +243,9 @@ t8_example_compare_performance_netcdf_var_properties (sc_MPI_Comm comm, int fore
243243
num_additional_vars = 2;
244244
}
245245

246-
t8_global_productionf ("The uniformly refined forest (refinement level = %d) has %ld global elements.\n",
247-
forest_refinement_level, static_cast<long> (t8_forest_get_global_num_leaf_elements (forest)));
246+
t8_global_productionf ("The uniformly refined forest (refinement level = %d) has %" T8_GLOIDX_FORMAT
247+
" global elements.\n",
248+
forest_refinement_level, t8_forest_get_global_num_leaf_elements (forest));
248249

249250
t8_global_productionf (
250251
"The different netCDF variable storage patterns and mpi variable access patterns are getting tested/timed...\n");
@@ -308,7 +309,7 @@ t8_example_compare_performance_netcdf_var_properties (sc_MPI_Comm comm, int fore
308309
#endif
309310
}
310311

311-
/** An example functions that writes out a netCDF-4 File containing the information of the forest and some user-defined/random-value variables
312+
/** An example functions that writes out a netCDF-4 File containing the information of the forest and some user-defined/random-value variables
312313
* \param [in] comm The MPI communicator to use.
313314
* \param [in] forest_refinement_level The initial refinement level of the forest.
314315
* \param [in] adapt_forest A flag whether an adapt step should be performed (=1) or not (=0).
@@ -360,7 +361,7 @@ t8_example_netcdf_write_forest (sc_MPI_Comm comm, int forest_refinement_level, i
360361

361362
/* Print out the number of local elements of each process */
362363
num_elements = t8_forest_get_local_num_leaf_elements (forest);
363-
t8_debugf ("[t8] Rank %d has %ld elements\n", mpirank, static_cast<long> (num_elements));
364+
t8_debugf ("[t8] Rank %d has %" T8_GLOIDX_FORMAT " elements\n", mpirank, num_elements);
364365

365366
/* *Example user-defined NetCDF variable* */
366367
/* Currently, integer (32bit, 64bit) and double NetCDF variables are possible */

example/advect/t8_advection.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,8 @@ t8_advect_solve (t8_cmesh_t cmesh, t8_flow_function_3d_fn u, t8_example_level_se
12491249
modulus = SC_MAX (1, time_steps / 10);
12501250
for (problem->num_time_steps = 0; !done; problem->num_time_steps++, problem->t += problem->delta_t) {
12511251
if (problem->num_time_steps % modulus == modulus - 1) {
1252-
t8_global_essentialf ("[advect] Step %i %li elems\n", problem->num_time_steps + 1,
1253-
static_cast<long> (t8_forest_get_global_num_leaf_elements (problem->forest)));
1252+
t8_global_essentialf ("[advect] Step %i %" T8_GLOIDX_FORMAT " elems\n", problem->num_time_steps + 1,
1253+
t8_forest_get_global_num_leaf_elements (problem->forest));
12541254
}
12551255
/* Time loop */
12561256

example/cmesh/t8_cmesh_hypercube_pad.cxx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ main (int argc, char **argv)
3232
{
3333
/* The prefix for our output files. */
3434
const char prefix[BUFSIZ] = "t8_forest_hypercube_pad";
35-
t8_locidx_t local_num_trees;
36-
t8_gloidx_t global_num_trees;
3735

3836
const double boundary_coords[24] = { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1 };
3937
/* Initialize MPI. This has to happen before we initialize sc or t8code. */
@@ -49,11 +47,11 @@ main (int argc, char **argv)
4947
t8_cmesh_t cmesh = t8_cmesh_new_hypercube_pad (T8_ECLASS_HEX, sc_MPI_COMM_WORLD, boundary_coords, 3, 3, 3, true);
5048

5149
/* Compute local and global number of trees. */
52-
local_num_trees = t8_cmesh_get_num_local_trees (cmesh);
53-
global_num_trees = t8_cmesh_get_num_trees (cmesh);
50+
t8_locidx_t local_num_trees = t8_cmesh_get_num_local_trees (cmesh);
51+
t8_gloidx_t global_num_trees = t8_cmesh_get_num_trees (cmesh);
5452
t8_global_productionf (" [step1] Created coarse mesh.\n");
5553
t8_global_productionf (" [step1] Local number of trees:\t%i\n", local_num_trees);
56-
t8_global_productionf (" [step1] Global number of trees:\t%li\n", static_cast<long> (global_num_trees));
54+
t8_global_productionf (" [step1] Global number of trees:\t%" T8_GLOIDX_FORMAT "\n", global_num_trees);
5755
const t8_scheme *scheme = t8_scheme_new_default ();
5856
t8_forest_t forest = t8_forest_new_uniform (cmesh, scheme, 0, 0, sc_MPI_COMM_WORLD);
5957
t8_forest_vtk_write_file (forest, prefix, 1, 1, 1, 1, 0, 0, NULL);

example/remove/t8_example_empty_trees.cxx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,20 @@ t8_strip_of_quads (t8_gloidx_t num_trees, t8_gloidx_t empty_tree, const char **v
7676
t8_debugf ("Output to %s\n", vtuname_adapt.c_str ());
7777

7878
t8_productionf ("The initial uniform forest:\n"
79-
"\tfirst_local_tree: %li\n"
80-
"\tlast_local_tree: %li\n"
81-
"\tlocal_num_trees: %i\n"
82-
"\tglobal_num_trees: %li\n",
83-
static_cast<long> (forest->first_local_tree), static_cast<long> (forest->last_local_tree),
84-
t8_forest_get_num_local_trees (forest), static_cast<long> (t8_forest_get_num_global_trees (forest)));
79+
"\tfirst_local_tree: %" T8_GLOIDX_FORMAT "\n"
80+
"\tlast_local_tree: %" T8_GLOIDX_FORMAT "\n"
81+
"\tlocal_num_trees: %" T8_LOCIDX_FORMAT "\n"
82+
"\tglobal_num_trees: %" T8_GLOIDX_FORMAT "\n",
83+
forest->first_local_tree, forest->last_local_tree, t8_forest_get_num_local_trees (forest),
84+
t8_forest_get_num_global_trees (forest));
8585

8686
t8_productionf ("The adapted forest with one empty tree:\n"
87-
"\tfirst_local_tree: %li\n"
88-
"\tlast_local_tree: %li\n"
89-
"\tlocal_num_trees: %i\n"
90-
"\tglobal_num_trees: %li\n",
91-
static_cast<long> (forest_adapt->first_local_tree), static_cast<long> (forest_adapt->last_local_tree),
92-
t8_forest_get_num_local_trees (forest_adapt),
93-
static_cast<long> (t8_forest_get_num_global_trees (forest_adapt)));
87+
"\tfirst_local_tree: %" T8_GLOIDX_FORMAT "\n"
88+
"\tlast_local_tree: %" T8_GLOIDX_FORMAT "\n"
89+
"\tlocal_num_trees: %" T8_LOCIDX_FORMAT "\n"
90+
"\tglobal_num_trees: %" T8_GLOIDX_FORMAT "\n",
91+
forest_adapt->first_local_tree, forest_adapt->last_local_tree,
92+
t8_forest_get_num_local_trees (forest_adapt), t8_forest_get_num_global_trees (forest_adapt));
9493

9594
t8_forest_unref (&forest_adapt);
9695
t8_forest_unref (&forest);
@@ -115,7 +114,7 @@ main (int argc, char **argv)
115114

116115
if (sreturnA > BUFSIZ || sreturnB > BUFSIZ) {
117116
/* The usage string or help message was truncated */
118-
/* Note: gcc >= 7.1 prints a warning if we
117+
/* Note: gcc >= 7.1 prints a warning if we
119118
* do not check the return value of snprintf. */
120119
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
121120
}

example/remove/t8_example_gauss_blob.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ t8_construct_spheres (const int initial_level, const double radius_inner, const
153153

154154
t8_3D_point midpoint ({ 0.5, 0.5, 0.5 });
155155

156-
/* On each face of a cube, a sphere rises halfway in.
156+
/* On each face of a cube, a sphere rises halfway in.
157157
* Its center is therefore the center of the corresponding surface. */
158158
struct t8_adapt_data adapt_data = { remove_scope, radius_inner, radius_outer, midpoint };
159159

@@ -190,7 +190,7 @@ main (int argc, char **argv)
190190

191191
if (sreturnA > BUFSIZ || sreturnB > BUFSIZ) {
192192
/* The usage string or help message was truncated */
193-
/* Note: gcc >= 7.1 prints a warning if we
193+
/* Note: gcc >= 7.1 prints a warning if we
194194
* do not check the return value of snprintf. */
195195
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
196196
}
@@ -239,7 +239,7 @@ main (int argc, char **argv)
239239
sc_options_print_usage (t8_get_package_id (), SC_LP_ERROR, opt, NULL);
240240
}
241241
else if (parsed >= 0 && 0 <= initial_level && radius_inner <= radius_outer && radius_inner >= 0
242-
&& (eclass_int > 3 || eclass_int < 8 || eclass_int == 0) && remove_scope >= 0 && remove_scope < 3) {
242+
&& ((eclass_int > 3 && eclass_int < 8) || eclass_int == 0) && remove_scope >= 0 && remove_scope < 3) {
243243
t8_construct_spheres (initial_level, radius_inner, radius_outer, remove_scope, (t8_eclass_t) eclass_int, vtuname);
244244
}
245245
else {

example/remove/t8_example_spheres.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ t8_adapt_callback_remove (t8_forest_t forest, t8_forest_t forest_from, t8_locidx
8181
return 0;
8282
}
8383

84-
/** Create a cube in which 6 half-spheres are removed, each on one side,
84+
/** Create a cube in which 6 half-spheres are removed, each on one side,
8585
* using geometric criteria. The surface of the spheres get refined.
8686
* \param [in] initial_level Initial level of the unit forest.
8787
* \param [in] radius_inner Radius of inner side of spheres shell.
8888
* \param [in] radius_outer Radius of outer side of spheres shell.
89-
* \param [in] eclass Element class. If 0, use hypercube hybrid.
89+
* \param [in] eclass Element class. If 0, use hypercube hybrid.
9090
* \param [in] vtuname Path for outputfiles.
91-
* \note The difference of \ref radius_inner and \ref radius_outer defines
91+
* \note The difference of \ref radius_inner and \ref radius_outer defines
9292
* the thickness of the refined surface of the spheres.
9393
*/
9494
static void
@@ -107,7 +107,7 @@ t8_construct_spheres (const int initial_level, const double radius_inner, const
107107
cmesh = t8_cmesh_new_hypercube_hybrid (sc_MPI_COMM_WORLD, 0, 0);
108108
}
109109

110-
/* On each face of a cube, a sphere rises halfway in.
110+
/* On each face of a cube, a sphere rises halfway in.
111111
* Its center is therefore the center of the corresponding surface. */
112112
const int num_spheres = 6;
113113
std::vector<t8_3D_point> midpoints
@@ -144,7 +144,7 @@ main (int argc, char **argv)
144144

145145
if (sreturnA > BUFSIZ || sreturnB > BUFSIZ) {
146146
/* The usage string or help message was truncated */
147-
/* Note: gcc >= 7.1 prints a warning if we
147+
/* Note: gcc >= 7.1 prints a warning if we
148148
* do not check the return value of snprintf. */
149149
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
150150
}
@@ -189,7 +189,7 @@ main (int argc, char **argv)
189189
sc_options_print_usage (t8_get_package_id (), SC_LP_ERROR, opt, NULL);
190190
}
191191
else if (parsed >= 0 && 0 <= initial_level && radius_inner <= radius_outer && radius_inner >= 0
192-
&& (eclass_int > 1 || eclass_int < 8 || eclass_int == 0)) {
192+
&& ((eclass_int > 1 && eclass_int < 8) || eclass_int == 0)) {
193193
t8_construct_spheres (initial_level, radius_inner, radius_outer, (t8_eclass_t) eclass_int, vtuname);
194194
}
195195
else {

src/t8.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#ifndef T8_H
3030
#define T8_H
3131

32+
#include <inttypes.h>
33+
3234
#include <sc_config.h>
3335
#if (defined(T8_ENABLE_MPI) && !defined(SC_ENABLE_MPI)) || (!defined(T8_ENABLE_MPI) && defined(SC_ENABLE_MPI))
3436
#error "MPI configured differently in t8code and libsc"
@@ -90,6 +92,8 @@ T8_EXTERN_C_BEGIN ();
9092

9193
/** A type for processor-local indexing. */
9294
typedef int32_t t8_locidx_t;
95+
/** The format specifier for t8_locidx_t */
96+
#define T8_LOCIDX_FORMAT PRId32
9397
/** The MPI Datatype of t8_locidx_t */
9498
#define T8_MPI_LOCIDX sc_MPI_INT
9599
/** Macro to get the absolute value of a t8_locidx_t */
@@ -102,6 +106,8 @@ typedef int32_t t8_locidx_t;
102106
typedef int t8_procidx_t;
103107
/** A type for global indexing that holds really big numbers. */
104108
typedef int64_t t8_gloidx_t;
109+
/** The format specifier for t8_gloidx_t */
110+
#define T8_GLOIDX_FORMAT PRId64
105111
/** The MPI Datatype of t8_gloidx_t */
106112
#define T8_MPI_GLOIDX sc_MPI_LONG_LONG_INT
107113
/** Macro to get the absolute value of a t8_gloidx_t */
@@ -113,6 +119,8 @@ typedef int64_t t8_gloidx_t;
113119

114120
/** A type for storing SFC indices */
115121
typedef uint64_t t8_linearidx_t;
122+
/** The format specifier for t8_linearidx_t */
123+
#define T8_LINEARIDX_FORMAT PRIu64
116124
/** The MPI datatype of t8_linearidx_t */
117125
#define T8_MPI_LINEARIDX sc_MPI_UNSIGNED_LONG_LONG
118126

src/t8_cmesh/t8_cmesh_internal/t8_cmesh_partition.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ t8_cmesh_partition_sendrange (const t8_cmesh_t cmesh, const t8_cmesh_t cmesh_fro
391391
ret--;
392392
}
393393

394-
t8_debugf ("%s_first = %i, %s_last = %i, last_tree = %li\n", "send", *send_first, "send", *send_last,
395-
static_cast<long> (ret));
394+
t8_debugf ("%s_first = %i, %s_last = %i, last_tree = %" T8_GLOIDX_FORMAT "\n", "send", *send_first, "send",
395+
*send_last, ret);
396396

397397
T8_ASSERT (*send_first >= 0);
398398
//TODO:reactivate T8_ASSERT (*send_last >= 0);
@@ -1613,7 +1613,7 @@ t8_cmesh_partition (t8_cmesh_t cmesh, sc_MPI_Comm comm)
16131613
/* Done with local num and tree_offset */
16141614
/***************************************************/
16151615
t8_cmesh_partition_given (cmesh, cmesh->set_from, tree_offsets, comm);
1616-
/* Deactivate the active tree. Tree related data (such as vertices) might have been moved by the new partition and
1616+
/* Deactivate the active tree. Tree related data (such as vertices) might have been moved by the new partition and
16171617
* has to be loaded again if needed. */
16181618
if (cmesh->geometry_handler != NULL) {
16191619
cmesh->geometry_handler->deactivate_tree ();

src/t8_cmesh/t8_cmesh_io/t8_cmesh_readmshfile.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const int t8_msh_tree_vertex_to_t8_vertex_num[T8_ECLASS_COUNT][8] = {
8080

8181
/** Translate the t8code vertex number to the .msh file vertex number.
8282
* See also http://gmsh.info/doc/texinfo/gmsh.html#Node-ordering */
83-
const int t8_vertex_to_msh_vertex_num[T8_ECLASS_COUNT][8] = {
83+
[[maybe_unused]] const int t8_vertex_to_msh_vertex_num[T8_ECLASS_COUNT][8] = {
8484
{ 0 }, /* VERTEX */
8585
{ 0, 1 }, /* LINE */
8686
{ 0, 1, 3, 2 }, /* QUAD */
@@ -455,7 +455,7 @@ t8_msh_file_2_read_nodes (FILE *fp)
455455
return std::nullopt;
456456
}
457457
/* Fill the node with the entries in the file */
458-
retval = sscanf (line, "%li %lf %lf %lf", &index, &coords[0], &coords[1], &coords[2]);
458+
retval = sscanf (line, "%" T8_GLOIDX_FORMAT " %lf %lf %lf", &index, &coords[0], &coords[1], &coords[2]);
459459
if (retval != 4) {
460460
t8_global_errorf ("Error reading node file after node %li.\n", (long) last_index);
461461
free (line);
@@ -466,7 +466,7 @@ t8_msh_file_2_read_nodes (FILE *fp)
466466
/* If second value is false then the node was already in the hash table.
467467
* This case should not occur. */
468468
if (emplaced.second == false) {
469-
t8_global_errorf ("Node %li defined more than once.\n", index);
469+
t8_global_errorf ("Node %" T8_GLOIDX_FORMAT " defined more than once.\n", index);
470470
free (line);
471471
return std::nullopt;
472472
}
@@ -746,7 +746,7 @@ t8_cmesh_msh_file_2_read_eles (t8_cmesh_t cmesh, FILE *fp, const t8_msh_node_tab
746746
for (int i_node = 0; i_node < num_nodes; i_node++) {
747747
const int t8_vertex_num = t8_msh_tree_vertex_to_t8_vertex_num[eclass][i_node];
748748
T8_ASSERT (strcmp (line_modify, "\0"));
749-
retval = sscanf (line_modify, "%li", &node_indices[t8_vertex_num]);
749+
retval = sscanf (line_modify, "%" T8_GLOIDX_FORMAT, &node_indices[t8_vertex_num]);
750750
if (retval != 1) {
751751
t8_global_errorf ("Premature end of line while reading tree.\n");
752752
t8_debugf ("The line is %s", line);
@@ -759,7 +759,7 @@ t8_cmesh_msh_file_2_read_eles (t8_cmesh_t cmesh, FILE *fp, const t8_msh_node_tab
759759
Node.index = node_indices[t8_vertex_num];
760760
const auto found_node = vertices.find (Node);
761761
if (found_node == vertices.end ()) {
762-
t8_global_errorf ("Could not find Node %li.\n", node_indices[t8_vertex_num]);
762+
t8_global_errorf ("Could not find Node %" T8_GLOIDX_FORMAT ".\n", node_indices[t8_vertex_num]);
763763
free (line);
764764
t8_cmesh_destroy (&cmesh);
765765
return std::nullopt;
@@ -1565,7 +1565,7 @@ t8_cmesh_msh_file_4_read_eles (t8_cmesh_t cmesh, FILE *fp, const t8_msh_node_tab
15651565
for (int i_node = 0; i_node < num_nodes; i_node++) {
15661566
const int t8_vertex_num = t8_msh_tree_vertex_to_t8_vertex_num[eclass][i_node];
15671567
T8_ASSERT (strcmp (line_modify, "\0"));
1568-
retval = sscanf (line_modify, "%li", &node_indices[t8_vertex_num]);
1568+
retval = sscanf (line_modify, "%" T8_GLOIDX_FORMAT, &node_indices[t8_vertex_num]);
15691569
if (retval != 1) {
15701570
t8_global_errorf ("Premature end of line while reading tree.\n");
15711571
t8_debugf ("The line is %s", line);

0 commit comments

Comments
 (0)