From 526c5d68683f15c3a24f8f6158c5124e6076ce5d Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Wed, 20 Mar 2019 17:33:05 +0000 Subject: [PATCH] Tweaks for C++ compilation --- src/common_io.c | 2 +- src/scheduler.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common_io.c b/src/common_io.c index 733cf1daca..2b8a55f0eb 100644 --- a/src/common_io.c +++ b/src/common_io.c @@ -557,7 +557,7 @@ void io_write_cell_offsets(hid_t h_grp, const int cdim[3], H5Gclose(h_subgrp); /* Write the centres to the group */ - hsize_t shape[2] = {nr_cells, 3}; + hsize_t shape[2] = {(hsize_t)nr_cells, 3}; hid_t h_space = H5Screate(H5S_SIMPLE); if (h_space < 0) error("Error while creating data space for cell centres"); hid_t h_err = H5Sset_extent_simple(h_space, 2, shape, shape); diff --git a/src/scheduler.c b/src/scheduler.c index 229c94b208..729b566e3b 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -465,7 +465,7 @@ void scheduler_write_dependencies(struct scheduler *s, int verbose) { if (s->nodeID == 0) { /* Create file */ - char *filename = "dependency_graph.csv"; + const char *filename = "dependency_graph.csv"; FILE *f = fopen(filename, "w"); if (f == NULL) error("Error opening dependency graph file."); -- GitLab