From: Alexey Shvetsov Date: Wed, 15 Jul 2015 23:37:44 +0000 (+0300) Subject: Fix build failure in view/filter.cpp X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=89ae0ff189049e9917115784628f9af3f1fbbb76 Fix build failure in view/filter.cpp This only happen if you have GMX_X11=ON Change-Id: I6d8d82985c88d2fb03bfaafc0afa32f0c3483803 Signed-off-by: Alexey Shvetsov --- diff --git a/src/programs/view/filter.cpp b/src/programs/view/filter.cpp index 84a7df32fc..82d583709f 100644 --- a/src/programs/view/filter.cpp +++ b/src/programs/view/filter.cpp @@ -36,12 +36,13 @@ */ #include "gmxpre.h" -#include +#include #include #include "gromacs/legacyheaders/macros.h" #include "gromacs/topology/index.h" +#include "gromacs/utility/cstringutil.h" #include "gromacs/utility/dir_separator.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/futil.h" @@ -123,10 +124,10 @@ t_dlg *select_filter(t_x11 *x11, t_gmx *gmx) char tmpfile[STRLEN]; int i, j, k, len, tlen, ht, ncol, nrow, x0; - len = strlen(title); + len = std::strlen(title); for (i = 0; (i < (int)gmx->filter->grps->nr); i++) { - len = std::max(len, (int)strlen(gmx->filter->grpnames[i])); + len = std::max(len, static_cast(std::strlen(gmx->filter->grpnames[i]))); } len += 2; @@ -144,7 +145,7 @@ t_dlg *select_filter(t_x11 *x11, t_gmx *gmx) { ht = 1+(gmx->filter->grps->nr+1)*2+3; } - strcpy(tmpfile, "filterXXXXXX"); + std::strcpy(tmpfile, "filterXXXXXX"); gmx_tmpnam(tmpfile); #ifdef DEBUG fprintf(stderr, "file: %s\n", tmpfile);