Skip to content

Commit

Permalink
Merge pull request #12807 from andrsd/gcc-8-fixes
Browse files Browse the repository at this point in the history
Gcc 8 fixes
  • Loading branch information
permcody committed Mar 5, 2019
2 parents 62a5555 + 143cfbe commit 20526db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion framework/contrib/tinydir/include/tinydir.h
Expand Up @@ -331,7 +331,7 @@ int tinydir_readfile(const tinydir_dir *dir, tinydir_file *file)
dir->_e->d_name
#endif
);
strcat(file->path, file->name);
strncat(file->path, file->name, _TINYDIR_PATH_MAX - 1);
#ifndef _MSC_VER
if (stat(file->path, &file->_s) == -1)
{
Expand Down
2 changes: 1 addition & 1 deletion framework/src/postprocessors/FindValueOnLine.C
Expand Up @@ -90,7 +90,7 @@ FindValueOnLine::execute()

bool found_it = false;
Real value = 0;
for (auto i = decltype(_depth)(0); i < _depth; ++i)
for (unsigned int i = 0; i < _depth; ++i)
{
// find midpoint
s = (s_left + s_right) / 2.0;
Expand Down
5 changes: 4 additions & 1 deletion framework/src/systems/NonlinearSystem.C
Expand Up @@ -343,9 +343,12 @@ NonlinearSystem::setupColoringFiniteDifferencedPreconditioner()

MatFDColoringCreate(petsc_mat->mat(), iscoloring, &_fdcoloring);
MatFDColoringSetFromOptions(_fdcoloring);
// clang-format off
MatFDColoringSetFunction(_fdcoloring,
(PetscErrorCode(*)(void)) & libMesh::libmesh_petsc_snes_fd_residual,
(PetscErrorCode(*)(void))(void (*)(void)) &
libMesh::libmesh_petsc_snes_fd_residual,
&petsc_nonlinear_solver);
// clang-format on
#if !PETSC_RELEASE_LESS_THAN(3, 5, 0)
MatFDColoringSetUp(petsc_mat->mat(), iscoloring, _fdcoloring);
#endif
Expand Down
2 changes: 1 addition & 1 deletion framework/src/vectorpostprocessors/SphericalAverage.C
Expand Up @@ -82,7 +82,7 @@ SphericalAverage::execute()
// add the volume contributed by the current quadrature point
if (bin >= 0 && bin < static_cast<int>(_nbins))
{
for (auto j = decltype(_nvals)(0); j < _nvals; ++j)
for (unsigned int j = 0; j < _nvals; ++j)
(*_average[j])[bin] += (*_values[j])[_qp];

_counts[bin]++;
Expand Down

0 comments on commit 20526db

Please sign in to comment.