gmx_int64_t numUpdatesExpected = state.histogramSize().numUpdates();
if (numUpdatesFromSamples != numUpdatesExpected)
{
- std::string mesg = gmx::formatString("The number of AWH updates in the checkpoint file (%ld) does not match the total number of AWH samples divided by the number of samples per update for %ld sharing AWH bias(es) (%ld/%ld=%ld)",
+ std::string mesg = gmx::formatString("The number of AWH updates in the checkpoint file (%ld) does not match the total number of AWH samples divided by the number of samples per update for %d sharing AWH bias(es) (%ld/%d=%ld)",
numUpdatesExpected,
params.numSharedUpdate,
numSamples,
if (numColumns < numColumnsMin)
{
std::string mesg =
- gmx::formatString("The number of columns in %s (%d) should be at least %d."
+ gmx::formatString("The number of columns in %s (%s) should be at least %d."
"\n\n%s",
filename.c_str(), correctFormatMessage.c_str());
GMX_THROW(InvalidInputError(mesg));
/* Check if the values are allowed. */
if (target < 0)
{
- std::string mesg = gmx::formatString("Target distribution weight at point %d (%g) in %s is negative.",
+ std::string mesg = gmx::formatString("Target distribution weight at point %zu (%g) in %s is negative.",
m, target, filename.c_str());
GMX_THROW(InvalidInputError(mesg));
}
sprintf(errormsg, "One pull coordinate (%d) cannot be mapped to two separate AWH dimensions (awh%d-dim%d and awh%d-dim%d). "
"If this is really what you want to do you will have to duplicate this pull coordinate.",
awhBiasParams1.dimParams[d1].coordIndex + 1, k1 + 1, d1 + 1, k2 + 1, d2 + 1);
- gmx_fatal(FARGS, errormsg);
+ gmx_fatal(FARGS, "%s", errormsg);
}
}
}
if ((period == 0) && (origin > end))
{
- gmx_fatal(FARGS, "For the non-periodic pull coordinates awh%d-dim%d-start cannot be larger than awh%d-dim%d-end",
+ gmx_fatal(FARGS, "For the non-periodic pull coordinates awh%d-dim%d-start cannot be larger than awh%f-dim%d-end",
k + 1, d + 1, origin, k + 1, d + 1, end);
}
}
else
{
- gmx_fatal(FARGS, "\nInvalid mode (%d) in do_ac_core", mode);
+ gmx_fatal(FARGS, "\nInvalid mode (%lu) in do_ac_core", mode);
}
}
}
}
else
{
- gmx_fatal(FARGS, "\nUnknown mode in do_autocorr (%d)", mode);
+ gmx_fatal(FARGS, "\nUnknown mode in do_autocorr (%lu)", mode);
}
sfree(cfour);
if (setmode == setcellsizeslbLOCAL)
{
gmx_fatal_collective(FARGS, dd->mpi_comm_all, DDMASTER(dd),
- error_string);
+ "%s", error_string);
}
else
{
- gmx_fatal(FARGS, error_string);
+ gmx_fatal(FARGS, "%s", error_string);
}
}
}
if (cmdlineDlbState == edlbsOnUser)
{
- gmx_fatal(FARGS, (dlbNotSupportedErr + reasonStr).c_str());
+ gmx_fatal(FARGS, "%s", (dlbNotSupportedErr + reasonStr).c_str());
}
else if (cmdlineDlbState == edlbsOffCanTurnOn)
{
{
if (state_local->ddp_count > dd->ddp_count)
{
- gmx_fatal(FARGS, "Internal inconsistency state_local->ddp_count (%d) > dd->ddp_count (%d)", state_local->ddp_count, dd->ddp_count);
+ gmx_fatal(FARGS, "Internal inconsistency state_local->ddp_count (%d) > dd->ddp_count (%ld)", state_local->ddp_count, dd->ddp_count);
}
if (state_local->ddp_count_cg_gl != state_local->ddp_count)
/* Check if the largest divisor is more than nnodes^2/3 */
if (ldiv*ldiv*ldiv > nnodes_div*nnodes_div)
{
- gmx_fatal(FARGS, "The number of ranks you selected (%d) contains a large prime factor %d. In most cases this will lead to bad performance. Choose a number with smaller prime factors or set the decomposition (option -dd) manually.",
+ gmx_fatal(FARGS, "The number of ranks you selected (%ld) contains a large prime factor %ld. In most cases this will lead to bad performance. Choose a number with smaller prime factors or set the decomposition (option -dd) manually.",
nnodes_div, ldiv);
}
}
{
errorMessage = gmx::formatString("%d of the %d bonded interactions could not be calculated because some atoms involved moved further apart than the multi-body cut-off distance (%g nm) or the two-body cut-off distance (%g nm), see option -rdd, for pairs and tabulated bonds also see option -ddcheck", -ndiff_tot, cr->dd->nbonded_global, dd_cutoff_multibody(dd), dd_cutoff_twobody(dd));
}
- gmx_fatal_collective(FARGS, cr->mpi_comm_mygroup, MASTER(cr), errorMessage.c_str());
+ gmx_fatal_collective(FARGS, cr->mpi_comm_mygroup, MASTER(cr), "%s", errorMessage.c_str());
}
/*! \brief Return global topology molecule information for global atom index \p i_gl */
* But we implement a complete failsafe solution anyhow.
*/
GMX_LOG(mdlog.warning).asParagraph().appendTextFormatted(
- "The fastest PP/PME load balancing setting (cutoff %.3f nm) is no longer available due to DD DLB or box size limitations", pme_lb->fastest);
+ "The fastest PP/PME load balancing setting (cutoff %.3d nm) is no longer available due to DD DLB or box size limitations", pme_lb->fastest);
pme_lb->fastest = pme_lb->lower_limit;
pme_lb->start = pme_lb->lower_limit;
}
}
else
{
- gmx_warning(buf);
+ gmx_warning("%s", buf);
}
}
{
if (getenv("GMX_ENX_NO_FATAL") != nullptr)
{
- gmx_warning(msg);
+ gmx_warning("%s", msg);
}
else
{
if ((precision != sizeof(float)) && !bDouble)
{
gmx_fatal(FARGS, "Unknown precision in file %s: real is %d bytes "
- "instead of %d or %d",
+ "instead of %lu or %lu",
gmx_fio_getname(fio), precision, sizeof(float), sizeof(double));
}
gmx_fio_setprecision(fio, bDouble);
gmx::ArrayRef<const std::string> intfn = opt2fns("-o", NFILE, fnm);
if (intfn.size() != 2)
{
- gmx_fatal(FARGS, "No or not correct number (2) of output-files: %d", intfn.size());
+ gmx_fatal(FARGS, "No or not correct number (2) of output-files: %ld", intfn.size());
}
calc_tetra_order_interface(ndxfnm, tpsfnm, trxfnm, binwidth, nsttblock, &frames, &xslices, &yslices, sg1, sg2, &intfpos, oenv);
writesurftoxpms(intfpos, frames, xslices, yslices, binwidth, intfn, nlevels);
gmx::ArrayRef<const std::string> spectra = opt2fns("-Spect", NFILE, fnm);
if (spectra.size() != 2)
{
- gmx_fatal(FARGS, "No or not correct number (2) of output-files: %d", spectra.size());
+ gmx_fatal(FARGS, "No or not correct number (2) of output-files: %ld", spectra.size());
}
powerspectavg(intfpos, frames, xslices, yslices, spectra);
}
gmx::ArrayRef<const std::string> raw = opt2fns("-or", NFILE, fnm);
if (raw.size() != 2)
{
- gmx_fatal(FARGS, "No or not correct number (2) of output-files: %d", raw.size());
+ gmx_fatal(FARGS, "No or not correct number (2) of output-files: %ld", raw.size());
}
writeraw(intfpos, frames, xslices, yslices, raw);
}
/* format error occured */
case sError:
- gmx_fatal(FARGS, "Error in the list of eigenvectors for %s at pos %d with char %c", listname, pos-startpos, *(pos-1));
+ gmx_fatal(FARGS, "Error in the list of eigenvectors for %s at pos %ld with char %c", listname, pos-startpos, *(pos-1));
/* logical error occured */
case sZero:
- gmx_fatal(FARGS, "Error in the list of eigenvectors for %s at pos %d: eigenvector 0 is not valid", listname, pos-startpos);
+ gmx_fatal(FARGS, "Error in the list of eigenvectors for %s at pos %ld: eigenvector 0 is not valid", listname, pos-startpos);
case sSmaller:
- gmx_fatal(FARGS, "Error in the list of eigenvectors for %s at pos %d: second index %d is not bigger than %d", listname, pos-startpos, end_number, number);
+ gmx_fatal(FARGS, "Error in the list of eigenvectors for %s at pos %ld: second index %d is not bigger than %d", listname, pos-startpos, end_number, number);
}
++pos; /* read next character */
} /*scanner has finished */
if (blk->sub[0].nr != nex*12)
{
- gmx_fatal(FARGS, "Number of orientation experiments in energy file (%g) does not match with the topology (%d)",
+ gmx_fatal(FARGS, "Number of orientation experiments in energy file (%d) does not match with the topology (%d)",
blk->sub[0].nr/12, nex);
}
fprintf(foten, " %10f", fr.t);
{
if (std::abs(y[0][i+1]-y[0][i]-opt->tabDz) > opt->tabDz/1e6)
{
- gmx_fatal(FARGS, "z-values in %s are not equally spaced.\n", ny, fn);
+ gmx_fatal(FARGS, "z-values in %d are not equally spaced.\n", ny, fn);
}
}
snew(opt->tabY, nl);
"3) If all ACTs are identical and know, you can define them with -bs-tau.\n"
" Use option (3) only if you are sure what you're doing, you may severely\n"
" underestimate the error if a too small ACT is given.\n");
- gmx_fatal(FARGS, errstr);
+ gmx_fatal(FARGS, "%s", errstr);
}
synthWindow->N [0] = N;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
}
if (strlen(filename) >= (size_t)maxlen)
{
- gmx_fatal(FARGS, "filename is longer (%d) than maxlen (%d)",
+ gmx_fatal(FARGS, "filename is longer (%zu) than maxlen (%d)",
strlen(filename), maxlen);
}
strcpy(filebase, cptr);
"Note that hydrogens might have been added to the entry for the N-terminus.\n"
"Remove this hydrogen or choose a different protonation state to solve it.\n"
"Option -ignh will ignore all hydrogens in the input." : ".");
- gmx_fatal(FARGS, buf);
+ gmx_fatal(FARGS, "%s", buf);
}
/* make shadow array to be sorted into indexgroup */
pdbi[i].resnr = pdba->atom[i].resind;
bVsiteAromatics = TRUE;
break;
default:
- gmx_fatal(FARGS, "DEATH HORROR in $s (%d): vsitestr[0]='%s'",
+ gmx_fatal(FARGS, "DEATH HORROR in $s (%s): vsitestr[0]='%d'",
__FILE__, __LINE__, vsitestr[0]);
} /* end switch */
}
else
{
- gmx_fatal(FARGS, errString);
+ gmx_fatal(FARGS, "%s", errString);
}
}
else if (bRM && ((tern >= 0 && ntdb[tern]->nhack == 0) ||
}
else
{
- gmx_fatal(FARGS, errString);
+ gmx_fatal(FARGS, "%s", errString);
}
}
}
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2012,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
}
else
{
- gmx_fatal(fatal_errno, file, line, message_buffer);
+ gmx_fatal(fatal_errno, file, line, "%s", message_buffer);
}
}
}
{
char errorstr[128];
sprintf(errorstr, "eSimTempScale=%d not defined", simtemp->eSimTempScale);
- gmx_fatal(FARGS, errorstr);
+ gmx_fatal(FARGS, "%s", errorstr);
}
}
}
case d_dihedral_restraints:
return F_DIHRES;
default:
- gmx_fatal(FARGS, "invalid directive %s in ifunc_index (%s:%s)",
+ gmx_fatal(FARGS, "invalid directive %s in ifunc_index (%s:%d)",
dir2str(d), __FILE__, __LINE__);
}
}
status = cpp_open_file(infile, &handle, cpp_opts(define, include, wi));
if (status != 0)
{
- gmx_fatal(FARGS, cpp_error(&handle, status));
+ gmx_fatal(FARGS, "%s", cpp_error(&handle, status));
}
/* some local variables */
{
if (status != eCPP_OK)
{
- gmx_fatal(FARGS, cpp_error(&handle, status));
+ gmx_fatal(FARGS, "%s", cpp_error(&handle, status));
}
else if (out)
{
{
if (status != eCPP_OK)
{
- gmx_fatal(FARGS, cpp_error(&handle, status));
+ gmx_fatal(FARGS, "%s", cpp_error(&handle, status));
}
else if (out)
{
status = cpp_close_file(&handle);
if (status != eCPP_OK)
{
- gmx_fatal(FARGS, cpp_error(&handle, status));
+ gmx_fatal(FARGS, "%s", cpp_error(&handle, status));
}
cpp_done();
if (out)
}
else
{
- gmx_fatal(FARGS, "Increase MAXSLEN in the grompp code to at least %d,"
+ gmx_fatal(FARGS, "Increase MAXSLEN in the grompp code to at least %lu,"
" or shorten your definition of bonds like %s to at most %d",
strlen(s)+1, s, MAXSLEN-1);
}
s += gmx::formatString(" Latency:\n ");
for (std::size_t j = 0; j < hwTop.machine().numa.nodes.size(); j++)
{
- s += gmx::formatString(" %5d", j);
+ s += gmx::formatString(" %5lu", j);
}
s += gmx::formatString("\n");
for (std::size_t i = 0; i < hwTop.machine().numa.nodes.size(); i++)
{
- s += gmx::formatString(" %5d", i);
+ s += gmx::formatString(" %5lu", i);
for (std::size_t j = 0; j < hwTop.machine().numa.nodes.size(); j++)
{
s += gmx::formatString(" %5.2f", hwTop.machine().numa.relativeLatency[i][j]);
if (gmx_debug_at)
{
#if BITMASK_SIZE <= 64 //move into bitmask when it is C++
- std::string flags = gmx::formatString("%x", *mask);
+ std::string flags = gmx::formatString("%lx", *mask);
#else
std::string flags = gmx::formatAndJoin(*mask,
*mask+BITMASK_ALEN,
{
loc += sprintf(&errorstr[loc], "%3d %17.10e%17.10e%17.10e\n", ifep, weighted_lamee[ifep], p_k[ifep], dfhist->sum_weights[ifep]);
}
- gmx_fatal(FARGS, errorstr);
+ gmx_fatal(FARGS, "%s", errorstr);
}
}
}
if (check_box(ir->ePBC, box))
{
- gmx_fatal(FARGS, check_box(ir->ePBC, box));
+ gmx_fatal(FARGS, "%s", check_box(ir->ePBC, box));
}
/* Test particle insertion ? */
{
if (!gmx_within_tol(ic->reppow, 12.0, 10*GMX_DOUBLE_EPS))
{
- gmx_fatal(FARGS, "Cut-off scheme %S only supports LJ repulsion power 12", ecutscheme_names[ir->cutoff_scheme]);
+ gmx_fatal(FARGS, "Cut-off scheme %s only supports LJ repulsion power 12", ecutscheme_names[ir->cutoff_scheme]);
}
/* Older tpr files can contain Coulomb user tables with the Verlet cutoff-scheme,
* while mdrun does not (and never did) support this.
/* This prints once per simulation for multi-simulations,
* which might help diagnose issues with inhomogenous
* cluster setups. */
- GMX_LOG(mdlog.info).appendTextFormatted(buffer);
+ GMX_LOG(mdlog.info).appendTextFormatted("%s", buffer);
if (debug)
{
/* This prints once per process for real MPI (i.e. once
li_task->ntriangle++;
if (li->blnr[i+1] - li->blnr[i] > static_cast<int>(sizeof(li_task->tri_bits[0])*8 - 1))
{
- gmx_fatal(FARGS, "A constraint is connected to %d constraints, this is more than the %d allowed for constraints participating in triangles",
+ gmx_fatal(FARGS, "A constraint is connected to %d constraints, this is more than the %lu allowed for constraints participating in triangles",
li->blnr[i+1] - li->blnr[i],
sizeof(li_task->tri_bits[0])*8-1);
}
if ((enerhist->nsum > 0 && nener != enerhist->ener_sum.size()) ||
(enerhist->nsum_sim > 0 && nener != enerhist->ener_sum_sim.size()))
{
- gmx_fatal(FARGS, "Mismatch between number of energies in run input (%d) and checkpoint file (%u or %u).",
+ gmx_fatal(FARGS, "Mismatch between number of energies in run input (%d) and checkpoint file (%zu or %zu).",
nener, enerhist->ener_sum.size(), enerhist->ener_sum_sim.size());
}
if (ngid*gridj->na_cj > gmx::index(sizeof(gid_cj)*8))
{
- gmx_fatal(FARGS, "The Verlet scheme with %dx%d kernels and free-energy only supports up to %d energy groups",
+ gmx_fatal(FARGS, "The Verlet scheme with %dx%d kernels and free-energy only supports up to %lu energy groups",
gridi->na_c, gridj->na_cj, (sizeof(gid_cj)*8)/gridj->na_cj);
}
if (!bBox || !bDD)
{
- gmx_warning(!bBox ? box_err : dd_err);
+ gmx_warning("%s", !bBox ? box_err : dd_err);
if (fp != nullptr)
{
fprintf(fp, "\n%s\n", !bBox ? box_err : dd_err);
}
listSetup += "updated every ";
// Make the shortest int format string that fits nstListForSpacing
- std::string nstListFormat = "%" + gmx::formatString("%d", gmx::formatString("%zu", nstListForSpacing).size()) + "d";
+ std::string nstListFormat = "%" + gmx::formatString("%lu", gmx::formatString("%d", nstListForSpacing).size()) + "d";
listSetup += gmx::formatString(nstListFormat.c_str(), nstList);
listSetup += gmx::formatString(" steps, buffer %.3f nm, rlist %.3f nm\n",
rList - interactionCutoff, rList);
case F_ANHARM_POL:
if (!gmx_within_tol(qS, atom[aS].qB, GMX_REAL_EPS*10))
{
- gmx_fatal(FARGS, "polarize can not be used with qA(%e) != qB(%e) for atom %d of molecule block %d", qS, atom[aS].qB, aS+1, mb+1);
+ gmx_fatal(FARGS, "polarize can not be used with qA(%e) != qB(%e) for atom %d of molecule block %lu", qS, atom[aS].qB, aS+1, mb+1);
}
shell[nsi].k += gmx::square(qS)*ONE_4PI_EPS0/
ffparams->iparams[type].polarize.alpha;
case F_WATER_POL:
if (!gmx_within_tol(qS, atom[aS].qB, GMX_REAL_EPS*10))
{
- gmx_fatal(FARGS, "water_pol can not be used with qA(%e) != qB(%e) for atom %d of molecule block %d", qS, atom[aS].qB, aS+1, mb+1);
+ gmx_fatal(FARGS, "water_pol can not be used with qA(%e) != qB(%e) for atom %d of molecule block %lu", qS, atom[aS].qB, aS+1, mb+1);
}
alpha = (ffparams->iparams[type].wpol.al_x+
ffparams->iparams[type].wpol.al_y+
{
if (!rerun_fr.bBox)
{
- gmx_fatal(FARGS, "Rerun trajectory frame step %d time %f does not contain a box, while pbc is used", rerun_fr.step, rerun_fr.time);
+ gmx_fatal(FARGS, "Rerun trajectory frame step %ld time %f does not contain a box, while pbc is used", rerun_fr.step, rerun_fr.time);
}
if (max_cutoff2(ir->ePBC, rerun_fr.box) < gmx::square(fr->rlist))
{
- gmx_fatal(FARGS, "Rerun trajectory frame step %d time %f has too small box dimensions", rerun_fr.step, rerun_fr.time);
+ gmx_fatal(FARGS, "Rerun trajectory frame step %ld time %f has too small box dimensions", rerun_fr.step, rerun_fr.time);
}
}
}
}
else if (atom_index.size() < 1000)
{
- GMX_LOG(mdlog.warning).appendTextFormatted("Small system size (N=%d), using full Hessian format.",
+ GMX_LOG(mdlog.warning).appendTextFormatted("Small system size (N=%zu), using full Hessian format.",
atom_index.size());
bSparse = FALSE;
}
}
else if (nsteps_cmdline < -2)
{
- gmx_fatal(FARGS, "Invalid nsteps value passed on the command line: %d",
+ gmx_fatal(FARGS, "Invalid nsteps value passed on the command line: %ld",
nsteps_cmdline);
}
/* Do nothing if nsteps_cmdline == -2 */
if (values->size() != 1)
{
GMX_THROW(gmx::InvalidInputError(gmx::formatString(
- "Expected 1 or %d values, got %d", length, values->size())));
+ "Expected 1 or %zu values, got %zu", length, values->size())));
}
const ValueType &value = (*values)[0];
values->resize(length, value);
default:
mesg += " Either you have excessively large distances between atoms in bonded interactions or your system is exploding.";
}
- gmx_fatal(FARGS, mesg.c_str());
+ gmx_fatal(FARGS, "%s", mesg.c_str());
}
/* The most likely reason for arriving here is a periodic molecule. */
if (dnorm2(r_ij[c]) == 0)
{
- gmx_fatal(FARGS, "Distance for pull coordinate %d is zero with constraint pulling, which is not allowed.", c + 1);
+ gmx_fatal(FARGS, "Distance for pull coordinate %lu is zero with constraint pulling, which is not allowed.", c + 1);
}
}
case epullgDIST:
if (pcrd->value_ref <= 0)
{
- gmx_fatal(FARGS, "The pull constraint reference distance for group %d is <= 0 (%f)", c, pcrd->value_ref);
+ gmx_fatal(FARGS, "The pull constraint reference distance for group %zu is <= 0 (%f)", c, pcrd->value_ref);
}
{
}
catch (const gmx::APIError &ex)
{
- report_error(stderr, name, ex.what());
+ report_error(stderr, name, "%s", ex.what());
bOk = false;
}
}
if (!isConsistent)
{
- GMX_THROW(InconsistentInputError(formatString("Derivative inconsistent with analytical function in range [%d,%d]", minFail, maxFail)));
+ GMX_THROW(InconsistentInputError(formatString("Derivative inconsistent with analytical function in range [%f,%f]", minFail, maxFail)));
}
}
}
if (!isConsistent)
{
- GMX_THROW(InconsistentInputError(formatString("Derivative inconsistent with numerical vector for elements %d-%d", minFail+1, maxFail+1)));
+ GMX_THROW(InconsistentInputError(formatString("Derivative inconsistent with numerical vector for elements %lu-%lu", minFail+1, maxFail+1)));
}
}
output += gmx::formatString("On host %s ", host);
}
output += gmx::formatString("%zu GPU%s %sselected for this run.\n"
- "Mapping of GPU IDs to the %d GPU task%s in the %d rank%s on this node:\n %s\n",
+ "Mapping of GPU IDs to the %zu GPU task%s in the %zu rank%s on this node:\n %s\n",
numGpusInUse, bPluralGpus ? "s" : "",
userSetGpuIds ? "user-" : "auto-",
numGpuTasksOnThisNode,
* TODO: When we have a proper parallel logging framework,
* the framework should add the rank and node numbers.
*/
- GMX_LOG(mdlog.warning).asParagraph().appendTextFormatted(mesg.c_str());
+ GMX_LOG(mdlog.warning).asParagraph().appendTextFormatted("%s", mesg.c_str());
}
}
status = cpp_open_file(fn, &handle, cppopts);
if (status != 0)
{
- gmx_fatal(FARGS, cpp_error(&handle, status));
+ gmx_fatal(FARGS, "%s", cpp_error(&handle, status));
}
do
{
{
if (status != eCPP_OK)
{
- gmx_fatal(FARGS, cpp_error(&handle, status));
+ gmx_fatal(FARGS, "%s", cpp_error(&handle, status));
}
else
{
status = cpp_close_file(&handle);
if (status != eCPP_OK)
{
- gmx_fatal(FARGS, cpp_error(&handle, status));
+ gmx_fatal(FARGS, "%s", cpp_error(&handle, status));
}
}
if (strlen(s) > (size_t)(maxlen-1))
{
- gmx_fatal(FARGS, "String '%s' (%d) is longer than buffer (%d).\n",
+ gmx_fatal(FARGS, "String '%s' (%zu) is longer than buffer (%d).\n",
s, strlen(s), maxlen-1);
}
if (alignment > alignmentSize)
{
gmx_fatal(errno, __FILE__, __LINE__,
- "Cannot allocate aligned memory with alignment > %u bytes\n(called from file %s, line %d)", alignmentSize, file, line);
+ "Cannot allocate aligned memory with alignment > %zu bytes\n(called from file %s, line %d)", alignmentSize, file, line);
}
if (p == nullptr)
{
gmx_fatal(errno, __FILE__, __LINE__,
- "Not enough memory. Failed to allocate %u aligned elements of size %u for %s\n(called from file %s, line %d)", nelem, elsize, name, file, line);
+ "Not enough memory. Failed to allocate %zu aligned elements of size %zu for %s\n(called from file %s, line %d)", nelem, elsize, name, file, line);
}
}
return p;