Fix compile error:

[  0%] Building C object wsutil/CMakeFiles/wsutil.dir/tempfile.c.o
/Users/jmayer/worktmp/wireshark/git/wsutil/tempfile.c:228:37: error: implicit conversion loses integer precision: 'unsigned long' to 'int'
      [-Werror,-Wshorten-64-to-32]
  fd = mkstemps(tf[idx].path, sfx ? strlen(sfx) : 0);
       ~~~~~~~~                     ^~~~~~~~~~~
1 error generated.

No idea whether this is the correct fix.

Change-Id: I80202d7eaad11fc3dcb5f9847f6e162caccb7e6e
Reviewed-on: https://code.wireshark.org/review/15672
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
This commit is contained in:
Joerg Mayer 2016-06-01 08:58:48 +02:00 committed by Jörg Mayer
parent 69a2585147
commit 1192798089
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ create_tempfile(char **namebuf, const char *pfx, const char *sfx)
permissions, attempt to create the file, and then put
the umask back. */
old_umask = ws_umask(0077);
fd = mkstemps(tf[idx].path, sfx ? strlen(sfx) : 0);
fd = mkstemps(tf[idx].path, sfx ? (int) strlen(sfx) : 0);
ws_umask(old_umask);
return fd;
}