Skip to content

Commit

Permalink
fixes in print-format specifiers (#22)
Browse files Browse the repository at this point in the history
* fixes in print-format specifiers

* add format-checking flag for C compiler
  • Loading branch information
slayoo authored Dec 1, 2023
1 parent 0a9c7b2 commit 978b01a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ add_test(camp_v1_paper_modal ${CMAKE_BINARY_DIR}/data_run/CAMP_v1_paper/modal/te
######################################################################
# camp library

set(STD_C_FLAGS "-std=c99")
set(STD_C_FLAGS "-std=c99 -Werror=format")
set(STD_CUDA_FLAGS "-dc -arch=compute_70 -code=sm_70")

if(${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
Expand Down
6 changes: 3 additions & 3 deletions src/rxns/rxn_surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,12 @@ void rxn_surface_print(int *rxn_int_data, double *rxn_float_data) {
printf("\n - d_reactant/d_phase_species_%d Jacobian id %d",
i_elem, PHASE_JAC_ID_(i_phase,0,i_elem));
for (int i_prod = 0; i_prod < NUM_PROD_; ++i_prod) {
printf("\n - d_product_%s/d_phase_species_%d Jacobian id %d",
printf("\n - d_product_%d/d_phase_species_%d Jacobian id %d",
i_prod, i_elem, PHASE_JAC_ID_(i_phase,i_prod+1,i_elem));
}
printf("\n - d_radius/d_phase_species_%d = %le", i_elem,
printf("\n - d_radius/d_phase_species_%d = %le",
i_elem, EFF_RAD_JAC_ELEM_(i_phase,i_elem));
printf("\n - d_number/d_phase_species_%d = %le", i_elem,
printf("\n - d_number/d_phase_species_%d = %le",
i_elem, EFF_RAD_JAC_ELEM_(i_phase,i_elem));
}
}
Expand Down

0 comments on commit 978b01a

Please sign in to comment.