mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-3905 Fix some compiler warnings (non-optimal solution)
X-SVN-Rev: 16038
This commit is contained in:
parent
234d74b5a0
commit
81e65e527f
1 changed files with 5 additions and 4 deletions
|
@ -37,9 +37,10 @@
|
|||
|
||||
#include "unicode/uwmsg.h"
|
||||
|
||||
#if defined(WIN32) || defined(U_CYGWIN)
|
||||
#if (defined(WIN32) || defined(U_CYGWIN)) && !defined(__STRICT_ANSI__)
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#define USE_FILENO_BINARY_MODE 1
|
||||
#endif
|
||||
|
||||
#ifdef UCONVMSG_LINK
|
||||
|
@ -638,7 +639,7 @@ ConvertFile::convertFile(const char *pname,
|
|||
} else {
|
||||
infilestr = "-";
|
||||
infile = stdin;
|
||||
#if defined(WIN32) || defined(U_CYGWIN)
|
||||
#ifdef USE_FILENO_BINARY_MODE
|
||||
if (setmode(fileno(stdin), O_BINARY) == -1) {
|
||||
initMsg(pname);
|
||||
u_wmsg(stderr, "cantSetInBinMode");
|
||||
|
@ -989,7 +990,7 @@ ConvertFile::convertFile(const char *pname,
|
|||
errtag = "problemCvtFromUOut";
|
||||
}
|
||||
|
||||
length = (int8_t)sprintf(pos, "%u", ferroffset);
|
||||
length = (int8_t)sprintf(pos, "%u", (int)ferroffset);
|
||||
|
||||
// output the code points that caused the error
|
||||
UnicodeString str;
|
||||
|
@ -1339,7 +1340,7 @@ main(int argc, char **argv)
|
|||
} else {
|
||||
outfilestr = "-";
|
||||
outfile = stdout;
|
||||
#if defined(WIN32) || defined(U_CYGWIN)
|
||||
#ifdef USE_FILENO_BINARY_MODE
|
||||
if (setmode(fileno(outfile), O_BINARY) == -1) {
|
||||
u_wmsg(stderr, "cantSetOutBinMode");
|
||||
exit(-1);
|
||||
|
|
Loading…
Add table
Reference in a new issue