ICU-3905 Fix some compiler warnings (non-optimal solution)
X-SVN-Rev: 16038
This commit is contained in:
parent
234d74b5a0
commit
81e65e527f
@ -37,9 +37,10 @@
|
|||||||
|
|
||||||
#include "unicode/uwmsg.h"
|
#include "unicode/uwmsg.h"
|
||||||
|
|
||||||
#if defined(WIN32) || defined(U_CYGWIN)
|
#if (defined(WIN32) || defined(U_CYGWIN)) && !defined(__STRICT_ANSI__)
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#define USE_FILENO_BINARY_MODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef UCONVMSG_LINK
|
#ifdef UCONVMSG_LINK
|
||||||
@ -638,7 +639,7 @@ ConvertFile::convertFile(const char *pname,
|
|||||||
} else {
|
} else {
|
||||||
infilestr = "-";
|
infilestr = "-";
|
||||||
infile = stdin;
|
infile = stdin;
|
||||||
#if defined(WIN32) || defined(U_CYGWIN)
|
#ifdef USE_FILENO_BINARY_MODE
|
||||||
if (setmode(fileno(stdin), O_BINARY) == -1) {
|
if (setmode(fileno(stdin), O_BINARY) == -1) {
|
||||||
initMsg(pname);
|
initMsg(pname);
|
||||||
u_wmsg(stderr, "cantSetInBinMode");
|
u_wmsg(stderr, "cantSetInBinMode");
|
||||||
@ -989,7 +990,7 @@ ConvertFile::convertFile(const char *pname,
|
|||||||
errtag = "problemCvtFromUOut";
|
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
|
// output the code points that caused the error
|
||||||
UnicodeString str;
|
UnicodeString str;
|
||||||
@ -1339,7 +1340,7 @@ main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
outfilestr = "-";
|
outfilestr = "-";
|
||||||
outfile = stdout;
|
outfile = stdout;
|
||||||
#if defined(WIN32) || defined(U_CYGWIN)
|
#ifdef USE_FILENO_BINARY_MODE
|
||||||
if (setmode(fileno(outfile), O_BINARY) == -1) {
|
if (setmode(fileno(outfile), O_BINARY) == -1) {
|
||||||
u_wmsg(stderr, "cantSetOutBinMode");
|
u_wmsg(stderr, "cantSetOutBinMode");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user