summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsjiang <sjiang@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-03-14 21:22:43 +0000
committersjiang <sjiang@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-03-14 21:22:43 +0000
commit46d4bda1a0b8da523cf8a0e3aa10046ea0de89e2 (patch)
treefc8c0b45480d2e514c37dfdebb9c7fb5ef32068e
parenteb69407d00f00f34df195ecd72ecb47e205ac245 (diff)
downloadATCD-46d4bda1a0b8da523cf8a0e3aa10046ea0de89e2.tar.gz
ChangeLog Tag: Tue Mar 14 20:58:12 UTC 2006 jiang,shanshan <shanshan.jiang@vanderbilt.edu>
-rw-r--r--ACEXML/common/FileCharStream.cpp4
-rw-r--r--ACEXML/common/HttpCharStream.cpp2
-rw-r--r--ACEXML/common/Transcode.cpp29
-rw-r--r--ACEXML/common/XML_Macros.h4
-rw-r--r--ACEXML/parser/parser/Parser.cpp2
-rw-r--r--ACEXML/parser/parser/Parser.i2
-rw-r--r--ace/ACE.cpp1
-rw-r--r--ace/Capabilities.cpp7
-rw-r--r--ace/Codecs.cpp12
-rw-r--r--ace/FIFO.cpp4
-rw-r--r--ace/FIFO.h4
-rw-r--r--ace/FIFO_Recv.cpp4
-rw-r--r--ace/FIFO_Recv.h4
-rw-r--r--ace/FIFO_Recv_Msg.cpp4
-rw-r--r--ace/FIFO_Recv_Msg.h4
-rw-r--r--ace/FIFO_Send.cpp4
-rw-r--r--ace/FIFO_Send.h4
-rw-r--r--ace/FIFO_Send_Msg.cpp4
-rw-r--r--ace/FIFO_Send_Msg.h4
-rw-r--r--ace/Get_Opt.cpp2
-rw-r--r--ace/INET_Addr.cpp2
-rw-r--r--ace/MEM_Acceptor.cpp2
-rw-r--r--ace/MEM_IO.cpp2
-rw-r--r--ace/RB_Tree.cpp3
-rw-r--r--ace/Reactor.cpp2
-rw-r--r--ace/SOCK_Dgram_Mcast.cpp5
-rw-r--r--ace/SV_Semaphore_Complex.cpp16
-rw-r--r--ace/SV_Semaphore_Complex.h32
-rw-r--r--ace/SV_Semaphore_Complex.inl16
-rw-r--r--ace/SV_Semaphore_Simple.cpp22
-rw-r--r--ace/SV_Semaphore_Simple.h40
-rw-r--r--ace/SV_Semaphore_Simple.inl18
-rw-r--r--ace/TTY_IO.cpp4
-rw-r--r--ace/UUID.cpp6
-rw-r--r--ace/WIN32_Asynch_IO.cpp4
-rw-r--r--apps/gperf/src/Gen_Perf.cpp2
-rw-r--r--apps/gperf/src/Key_List.cpp4
-rw-r--r--apps/gperf/src/List_Node.cpp4
-rw-r--r--apps/gperf/src/Options.cpp4
-rw-r--r--protocols/ace/HTBP/HTBP_ID_Requestor.cpp2
40 files changed, 143 insertions, 152 deletions
diff --git a/ACEXML/common/FileCharStream.cpp b/ACEXML/common/FileCharStream.cpp
index 2e3fc8abc5c..cafc0696b5c 100644
--- a/ACEXML/common/FileCharStream.cpp
+++ b/ACEXML/common/FileCharStream.cpp
@@ -130,7 +130,7 @@ ACEXML_FileCharStream::close (void)
int
ACEXML_FileCharStream::getchar_i (char& ch)
{
- ch = ACE_OS::fgetc (this->infile_);
+ ch = static_cast<char> (ACE_OS::fgetc (this->infile_));
return (feof(this->infile_) ? -1 : 0);
}
@@ -166,7 +166,7 @@ ACEXML_FileCharStream::peek (void)
return this->peek_i();
#else
- ACEXML_Char ch = ACE_OS::fgetc (this->infile_);
+ ACEXML_Char ch = static_cast<ACEXML_Char> (ACE_OS::fgetc (this->infile_));
::ungetc (ch, this->infile_);
return ch;
#endif /* ACE_USES_WCHAR */
diff --git a/ACEXML/common/HttpCharStream.cpp b/ACEXML/common/HttpCharStream.cpp
index 42015f16213..b6f5e6aa423 100644
--- a/ACEXML/common/HttpCharStream.cpp
+++ b/ACEXML/common/HttpCharStream.cpp
@@ -321,7 +321,7 @@ ACEXML_HttpCharStream::determine_encoding (void)
char input[4] = {0, 0, 0, 0};
int i = 0;
for (; i < 4 && input[i] != (char)-1; ++i)
- input[i] = this->stream_->peek_char(i);
+ input[i] = static_cast<char> (this->stream_->peek_char(i));
if (i < 4)
return -1;
const ACEXML_Char* temp = ACEXML_Encoding::get_encoding (input);
diff --git a/ACEXML/common/Transcode.cpp b/ACEXML/common/Transcode.cpp
index e43a407d2e3..f94d93bba32 100644
--- a/ACEXML/common/Transcode.cpp
+++ b/ACEXML/common/Transcode.cpp
@@ -26,8 +26,8 @@ ACEXML_Transcoder::utf162utf8 (ACEXML_UTF16 src,
if (len < 2)
return ACEXML_DESTINATION_TOO_SHORT;
- *dst = 0xc0 | (src / 0x40);
- *(dst+1) = 0x80 | (src % 0x40);
+ *dst = 0xc0 | (static_cast<ACEXML_UTF8> (src) / 0x40);
+ *(dst+1) = 0x80 | (static_cast<ACEXML_UTF8> (src) % 0x40);
return 2;
}
else
@@ -39,13 +39,12 @@ ACEXML_Transcoder::utf162utf8 (ACEXML_UTF16 src,
if (src >= 0xD800 && src < 0xE000)
return ACEXML_IS_SURROGATE;
- *dst = 0xe0 | (src / 0x1000);
- *(dst+1) = 0x80 | ((src % 0x1000) / 0x40);
- *(dst+2) = 0x80 | (src % 0x40);
+ *dst = 0xe0 | (static_cast<ACEXML_UTF8> (src) / 0x1000);
+ *(dst+1) = 0x80 | ((static_cast<ACEXML_UTF8> (src) % 0x1000) / 0x40);
+ *(dst+2) = 0x80 | (static_cast<ACEXML_UTF8> (src) % 0x40);
return 3;
}
- ACE_NOTREACHED (return ACEXML_NON_UNICODE;)
- }
+}
int
ACEXML_Transcoder::ucs42utf8 (ACEXML_UCS4 src,
@@ -67,10 +66,10 @@ ACEXML_Transcoder::ucs42utf8 (ACEXML_UCS4 src,
if (dst == 0)
return ACEXML_INVALID_ARGS;
- *dst = 0xf0 | (src / 0x40000);
- *(dst+1) = 0x80 | ((src % 0x40000) / 0x1000);
- *(dst+2) = 0x80 | ((src % 0x1000) / 0x40);
- *(dst+3) = 0x80 | (src % 0x40);
+ *dst = 0xf0 | (static_cast<ACEXML_UTF8> (src / 0x40000));
+ *(dst+1) = 0x80 | ((static_cast<ACEXML_UTF8> (src % 0x40000)) / 0x1000);
+ *(dst+2) = 0x80 | ((static_cast<ACEXML_UTF8> (src % 0x1000)) / 0x40);
+ *(dst+3) = 0x80 | (static_cast<ACEXML_UTF8> (src % 0x40));
return 4;
}
return ACEXML_NON_UNICODE;
@@ -102,8 +101,8 @@ ACEXML_Transcoder::ucs42utf16 (ACEXML_UCS4 src,
if (len < 2)
return ACEXML_DESTINATION_TOO_SHORT;
- *dst = 0xD800 | (src / 0x400);
- *(dst+1) = 0xDC00 | (src % 0x400);
+ *dst = 0xD800 | (static_cast<ACEXML_UTF16> (src) / 0x400);
+ *(dst+1) = 0xDC00 | (static_cast<ACEXML_UTF16> (src) % 0x400);
return 2;
}
@@ -125,8 +124,8 @@ ACEXML_Transcoder::surrogate2utf8 (ACEXML_UTF16 high,
return ACEXML_INVALID_ARGS;
ACEXML_UCS4 src = (high - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000;
- *dst = 0xD800 | (src / 0x400);
- *(dst+1) = 0xDC00 | (src % 0x400);
+ *dst = static_cast<ACEXML_UTF8> (0xD800 | (src / 0x400));
+ *(dst+1) = static_cast<ACEXML_UTF8> (0xDC00 | (src % 0x400));
return 2;
}
diff --git a/ACEXML/common/XML_Macros.h b/ACEXML/common/XML_Macros.h
index 028bc590395..50ec6857b3a 100644
--- a/ACEXML/common/XML_Macros.h
+++ b/ACEXML/common/XML_Macros.h
@@ -88,12 +88,12 @@
throw EXCEPTION
// Throwing an exception when the function reqires a return value.
-# if defined (WIN32) || defined (__HP_aCC)
+# if defined (__HP_aCC)
# define ACEXML_THROW_RETURN(EXCEPTION, RETV) \
do \
{ \
throw EXCEPTION; \
- return RETV; \
+ return RETV; \
} while (0)
# else /* WIN32 */
# define ACEXML_THROW_RETURN(EXCEPTION,RETV) \
diff --git a/ACEXML/parser/parser/Parser.cpp b/ACEXML/parser/parser/Parser.cpp
index c9cc164c1cf..6573f019b17 100644
--- a/ACEXML/parser/parser/Parser.cpp
+++ b/ACEXML/parser/parser/Parser.cpp
@@ -3161,7 +3161,7 @@ void
ACEXML_Parser::parse_encoding_decl (ACEXML_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((ACEXML_SAXException))
{
- ACEXML_Char* astring;
+ ACEXML_Char* astring = 0;
if ((this->parse_token (ACE_TEXT("ncoding")) < 0)
|| this->skip_equal () != 0
|| this->parse_encname (astring) != 0)
diff --git a/ACEXML/parser/parser/Parser.i b/ACEXML/parser/parser/Parser.i
index 0857aa37835..97896a68388 100644
--- a/ACEXML/parser/parser/Parser.i
+++ b/ACEXML/parser/parser/Parser.i
@@ -238,7 +238,7 @@ ACEXML_Parser::peek (void)
ACEXML_Char ch = 0;
const ACEXML_InputSource* ip = this->current_->getInputSource();
ACEXML_CharStream* instream = ip->getCharStream();
- ch = instream->peek ();
+ ch = static_cast<ACEXML_Char> (instream->peek ());
return (ch > 0 ? ch : 0);
}
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index e480fa5499f..3e900bc24ef 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -2810,7 +2810,6 @@ ACE::handle_timed_accept (ACE_HANDLE listener,
/* NOTREACHED */
}
}
- ACE_NOTREACHED (return 0);
}
// Make the current process a UNIX daemon. This is based on Stevens
diff --git a/ace/Capabilities.cpp b/ace/Capabilities.cpp
index e5903549b54..13ce7a77f51 100644
--- a/ace/Capabilities.cpp
+++ b/ace/Capabilities.cpp
@@ -321,8 +321,8 @@ ACE_Capabilities::getent (const ACE_TCHAR *fname, const ACE_TCHAR *name)
int done;
ACE_TString line;
-
- while (!(done = (this->getline (fp, line) == -1))
+
+ while (0 == (done = (this->getline (fp, line) == -1))
&& is_empty (line.c_str ()))
continue;
@@ -331,7 +331,8 @@ ACE_Capabilities::getent (const ACE_TCHAR *fname, const ACE_TCHAR *name)
ACE_TString newline;
ACE_TString description;
- while (!(done = (this->getline (fp, newline) == -1)))
+ done = this->getline (fp, newline) == -1;
+ while (!done)
if (is_line (newline.c_str ()))
description += newline;
else
diff --git a/ace/Codecs.cpp b/ace/Codecs.cpp
index 027231d322b..ae054c26938 100644
--- a/ace/Codecs.cpp
+++ b/ace/Codecs.cpp
@@ -157,9 +157,9 @@ ACE_Base64::decode (const ACE_Byte* input, size_t* output_len)
if (char_count == 4)
{
- result[pos++] = bits >> 16;
- result[pos++] = (bits >> 8) & 0xff;
- result[pos++] = bits & 0xff;
+ result[pos++] = static_cast<ACE_Byte> (bits) >> 16;
+ result[pos++] = (static_cast<ACE_Byte> (bits) >> 8) & 0xff;
+ result[pos++] = static_cast<ACE_Byte> (bits) & 0xff;
bits = 0;
char_count = 0;
}
@@ -190,11 +190,11 @@ ACE_Base64::decode (const ACE_Byte* input, size_t* output_len)
errors++;
break;
case 2:
- result[pos++] = bits >> 10;
+ result[pos++] = static_cast<ACE_Byte> (bits) >> 10;
break;
case 3:
- result[pos++] = bits >> 16;
- result[pos++] = (bits >> 8) & 0xff;
+ result[pos++] = static_cast<ACE_Byte> (bits) >> 16;
+ result[pos++] = (static_cast<ACE_Byte> (bits) >> 8) & 0xff;
break;
}
}
diff --git a/ace/FIFO.cpp b/ace/FIFO.cpp
index 89624fc4231..3f2a4c5115b 100644
--- a/ace/FIFO.cpp
+++ b/ace/FIFO.cpp
@@ -31,7 +31,7 @@ ACE_FIFO::dump (void) const
}
int
-ACE_FIFO::open (const ACE_TCHAR *r, int flags, int perms,
+ACE_FIFO::open (const ACE_TCHAR *r, int flags, mode_t perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO::open");
@@ -54,7 +54,7 @@ ACE_FIFO::open (const ACE_TCHAR *r, int flags, int perms,
ACE_FIFO::ACE_FIFO (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO::ACE_FIFO");
diff --git a/ace/FIFO.h b/ace/FIFO.h
index f710dabcc2b..066e3e98035 100644
--- a/ace/FIFO.h
+++ b/ace/FIFO.h
@@ -41,7 +41,7 @@ class ACE_Export ACE_FIFO : public ACE_IPC_SAP
public:
/// Open up the named pipe on the <rendezvous> in accordance with the
/// flags.
- int open (const ACE_TCHAR *rendezvous, int flags, int perms,
+ int open (const ACE_TCHAR *rendezvous, int flags, mode_t perms,
LPSECURITY_ATTRIBUTES sa = 0);
/// Close down the ACE_FIFO without removing the rendezvous point.
@@ -67,7 +67,7 @@ protected:
/// Open up the named pipe on the <rendezvous> in accordance with the
/// flags.
- ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, int perms,
+ ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, mode_t perms,
LPSECURITY_ATTRIBUTES sa = 0);
private:
diff --git a/ace/FIFO_Recv.cpp b/ace/FIFO_Recv.cpp
index 5e6ac9055b5..50a39067bb0 100644
--- a/ace/FIFO_Recv.cpp
+++ b/ace/FIFO_Recv.cpp
@@ -45,7 +45,7 @@ ACE_FIFO_Recv::close (void)
int
ACE_FIFO_Recv::open (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
int persistent,
LPSECURITY_ATTRIBUTES sa)
{
@@ -70,7 +70,7 @@ ACE_FIFO_Recv::ACE_FIFO_Recv (void)
ACE_FIFO_Recv::ACE_FIFO_Recv (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
int persistent,
LPSECURITY_ATTRIBUTES sa)
: aux_handle_ (ACE_INVALID_HANDLE)
diff --git a/ace/FIFO_Recv.h b/ace/FIFO_Recv.h
index 979b43891a0..fc4ec2222f3 100644
--- a/ace/FIFO_Recv.h
+++ b/ace/FIFO_Recv.h
@@ -43,14 +43,14 @@ public:
/// Open up a bytestream named pipe for reading.
ACE_FIFO_Recv (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
LPSECURITY_ATTRIBUTES sa = 0);
/// Open up a bytestream named pipe for reading.
int open (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
LPSECURITY_ATTRIBUTES sa = 0);
diff --git a/ace/FIFO_Recv_Msg.cpp b/ace/FIFO_Recv_Msg.cpp
index ad45d3c705f..7aa5b1d6721 100644
--- a/ace/FIFO_Recv_Msg.cpp
+++ b/ace/FIFO_Recv_Msg.cpp
@@ -30,7 +30,7 @@ ACE_FIFO_Recv_Msg::dump (void) const
int
ACE_FIFO_Recv_Msg::open (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
int persistent,
LPSECURITY_ATTRIBUTES sa)
{
@@ -50,7 +50,7 @@ ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (void)
ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
int persistent,
LPSECURITY_ATTRIBUTES sa)
{
diff --git a/ace/FIFO_Recv_Msg.h b/ace/FIFO_Recv_Msg.h
index 600a06a03ac..b1c7afe3eb3 100644
--- a/ace/FIFO_Recv_Msg.h
+++ b/ace/FIFO_Recv_Msg.h
@@ -52,14 +52,14 @@ public:
/// Open up a record-oriented named pipe for reading.
ACE_FIFO_Recv_Msg (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
LPSECURITY_ATTRIBUTES sa = 0);
/// Open up a record-oriented named pipe for reading.
int open (const ACE_TCHAR *rendezvous,
int flags = O_CREAT | O_RDONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
int persistent = 1,
LPSECURITY_ATTRIBUTES sa = 0);
diff --git a/ace/FIFO_Send.cpp b/ace/FIFO_Send.cpp
index d494f418c44..c29871430ed 100644
--- a/ace/FIFO_Send.cpp
+++ b/ace/FIFO_Send.cpp
@@ -30,7 +30,7 @@ ACE_FIFO_Send::ACE_FIFO_Send (void)
int
ACE_FIFO_Send::open (const ACE_TCHAR *rendezvous_name,
int flags,
- int perms,
+ mode_t perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO_Send::open");
@@ -42,7 +42,7 @@ ACE_FIFO_Send::open (const ACE_TCHAR *rendezvous_name,
ACE_FIFO_Send::ACE_FIFO_Send (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO_Send::ACE_FIFO_Send");
diff --git a/ace/FIFO_Send.h b/ace/FIFO_Send.h
index b60db0536bc..45e02c87c38 100644
--- a/ace/FIFO_Send.h
+++ b/ace/FIFO_Send.h
@@ -42,13 +42,13 @@ public:
/// Open up a bytestream named pipe for writing.
ACE_FIFO_Send (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
/// Open up a bytestream named pipe for writing.
int open (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
/// Send <buf> of up to <len> bytes.
diff --git a/ace/FIFO_Send_Msg.cpp b/ace/FIFO_Send_Msg.cpp
index 0a04f65117e..f39c5d865e9 100644
--- a/ace/FIFO_Send_Msg.cpp
+++ b/ace/FIFO_Send_Msg.cpp
@@ -60,7 +60,7 @@ ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (void)
int
ACE_FIFO_Send_Msg::open (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO_Send_Msg::open");
@@ -69,7 +69,7 @@ ACE_FIFO_Send_Msg::open (const ACE_TCHAR *fifo_name,
ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (const ACE_TCHAR *fifo_name,
int flags,
- int perms,
+ mode_t perms,
LPSECURITY_ATTRIBUTES sa)
{
ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg");
diff --git a/ace/FIFO_Send_Msg.h b/ace/FIFO_Send_Msg.h
index 88a1c8a425b..8272ec6c819 100644
--- a/ace/FIFO_Send_Msg.h
+++ b/ace/FIFO_Send_Msg.h
@@ -46,13 +46,13 @@ public:
/// Open up a record-oriented named pipe for writing.
ACE_FIFO_Send_Msg (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
/// Open up a record-oriented named pipe for writing.
int open (const ACE_TCHAR *rendezvous,
int flags = O_WRONLY,
- int perms = ACE_DEFAULT_FILE_PERMS,
+ mode_t perms = ACE_DEFAULT_FILE_PERMS,
LPSECURITY_ATTRIBUTES sa = 0);
/// Send <buf> of up to <len> bytes.
diff --git a/ace/Get_Opt.cpp b/ace/Get_Opt.cpp
index 59b6c4f2a5c..c2b56b4fd53 100644
--- a/ace/Get_Opt.cpp
+++ b/ace/Get_Opt.cpp
@@ -494,7 +494,7 @@ ACE_Get_Opt::long_option (const ACE_TCHAR *name,
// isalnum, otherwise, it will crash the program.
if (short_option > 0 &&
short_option < 256 &&
- ACE_OS::ace_isalnum (short_option) != 0)
+ ACE_OS::ace_isalnum (static_cast<char> (short_option)) != 0)
#else
if (ACE_OS::ace_isalnum (short_option) != 0)
#endif /* _MSC_VER && _MSC_VER >= 1300 */
diff --git a/ace/INET_Addr.cpp b/ace/INET_Addr.cpp
index c4e682fe10e..78e0557c9a5 100644
--- a/ace/INET_Addr.cpp
+++ b/ace/INET_Addr.cpp
@@ -313,7 +313,7 @@ ACE_INET_Addr::set (u_short port_number,
// IPv6 not supported... insure the family is set to IPv4
address_family = AF_INET;
this->set_type (address_family);
- this->inet_addr_.in4_.sin_family = address_family;
+ this->inet_addr_.in4_.sin_family = static_cast<short> (address_family);
struct in_addr addrv4;
if (ACE_OS::inet_aton (host_name,
&addrv4) == 1)
diff --git a/ace/MEM_Acceptor.cpp b/ace/MEM_Acceptor.cpp
index bf72cfe8e0d..08ec50034f4 100644
--- a/ace/MEM_Acceptor.cpp
+++ b/ace/MEM_Acceptor.cpp
@@ -176,7 +176,7 @@ ACE_MEM_Acceptor::accept (ACE_MEM_Stream &new_stream,
// Protocol negociation:
// Tell the client side what level of signaling strategy
// we support.
- ACE_INT16 client_signaling =
+ ACE_MEM_IO::Signal_Strategy client_signaling =
#if defined (ACE_WIN32) || !defined (_ACE_USE_SV_SEM)
this->preferred_strategy_;
#else
diff --git a/ace/MEM_IO.cpp b/ace/MEM_IO.cpp
index 957262f9493..7a9616f5220 100644
--- a/ace/MEM_IO.cpp
+++ b/ace/MEM_IO.cpp
@@ -273,8 +273,6 @@ ACE_MT_MEM_IO::recv_buf (ACE_MEM_SAP_Node *&buf,
return buf->size ();
return -1;
}
-
- ACE_NOTREACHED (return 0;)
}
ssize_t
diff --git a/ace/RB_Tree.cpp b/ace/RB_Tree.cpp
index d037e855e91..a93b6967145 100644
--- a/ace/RB_Tree.cpp
+++ b/ace/RB_Tree.cpp
@@ -710,8 +710,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert_i (const EXT_ID &k,
this->root_->color (ACE_RB_Tree_Node_Base::BLACK);
++current_size_;
return &this->root_->item ();
- }
- return 0;
+ }
}
// Inserts a *copy* of the key and the item into the tree: both the
diff --git a/ace/Reactor.cpp b/ace/Reactor.cpp
index 7fc7608ab21..6a667f679c0 100644
--- a/ace/Reactor.cpp
+++ b/ace/Reactor.cpp
@@ -328,8 +328,6 @@ ACE_Reactor::run_alertable_reactor_event_loop (ACE_Time_Value &tv,
else if (result <= 0)
return result;
}
-
- ACE_NOTREACHED (return 0;)
}
int
diff --git a/ace/SOCK_Dgram_Mcast.cpp b/ace/SOCK_Dgram_Mcast.cpp
index cde3a99c24f..5f325a7e519 100644
--- a/ace/SOCK_Dgram_Mcast.cpp
+++ b/ace/SOCK_Dgram_Mcast.cpp
@@ -49,9 +49,8 @@ public:
ACE_OS::strcpy (ret_string, ACE_LIB_TEXT ("<?>"));
else
{
- ACE_TCHAR *pc;
- if (clip_portnum
- && (pc = ACE_OS::strrchr (ret_string, ACE_LIB_TEXT (':'))))
+ ACE_TCHAR *pc = ACE_OS::strrchr (ret_string, ACE_LIB_TEXT (':'));
+ if (clip_portnum && pc)
*pc = ACE_LIB_TEXT ('\0'); // clip port# info.
}
}
diff --git a/ace/SV_Semaphore_Complex.cpp b/ace/SV_Semaphore_Complex.cpp
index 0b0207bb77d..ce3c0b07858 100644
--- a/ace/SV_Semaphore_Complex.cpp
+++ b/ace/SV_Semaphore_Complex.cpp
@@ -65,10 +65,10 @@ sembuf ACE_SV_Semaphore_Complex::op_unlock_[1] =
int
ACE_SV_Semaphore_Complex::open (key_t k,
- int create,
+ short create,
int initial_value,
u_short nsems,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::open");
if (k == IPC_PRIVATE)
@@ -160,10 +160,10 @@ ACE_SV_Semaphore_Complex::open (key_t k,
int
ACE_SV_Semaphore_Complex::open (const char *name,
- int flags,
+ short flags,
int initial_value,
u_short nsems,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::open");
return this->open (ACE_SV_Semaphore_Simple::name_2_key (name),
@@ -214,10 +214,10 @@ ACE_SV_Semaphore_Complex::close (void)
}
ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (key_t k,
- int flags,
+ short flags,
int initial_value,
u_short nsems,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex");
if (this->open (k, flags, initial_value, nsems, perms) == -1)
@@ -225,10 +225,10 @@ ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (key_t k,
}
ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex (const char *name,
- int flags,
+ short flags,
int initial_value,
u_short nsems,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::ACE_SV_Semaphore_Complex");
diff --git a/ace/SV_Semaphore_Complex.h b/ace/SV_Semaphore_Complex.h
index 7911719f7d7..de48fc09359 100644
--- a/ace/SV_Semaphore_Complex.h
+++ b/ace/SV_Semaphore_Complex.h
@@ -63,32 +63,32 @@ public:
// = Initialization and termination methods.
ACE_SV_Semaphore_Complex (void);
ACE_SV_Semaphore_Complex (key_t key,
- int create = ACE_SV_Semaphore_Complex::ACE_CREATE,
+ short create = ACE_SV_Semaphore_Complex::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
ACE_SV_Semaphore_Complex (const char *name,
- int create = ACE_SV_Semaphore_Complex::ACE_CREATE,
+ short create = ACE_SV_Semaphore_Complex::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
~ACE_SV_Semaphore_Complex (void);
/// Open or create an array of SV_Semaphores. We return 0 if all is
/// OK, else -1.
int open (const char *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
/// Open or create an array of SV_Semaphores. We return 0 if all is
/// OK, else -1.
int open (key_t key,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
/**
* Close an ACE_SV_Semaphore. Unlike the <remove> method, this
@@ -102,28 +102,28 @@ public:
// = Semaphore acquire and release methods.
/// Acquire the semaphore.
- int acquire (u_short n = 0, int flags = 0) const;
+ int acquire (u_short n = 0, short flags = 0) const;
/// Acquire a semaphore for reading.
- int acquire_read (u_short n = 0, int flags = 0) const;
+ int acquire_read (u_short n = 0, short flags = 0) const;
/// Acquire a semaphore for writing
- int acquire_write (u_short n = 0, int flags = 0) const;
+ int acquire_write (u_short n = 0, short flags = 0) const;
/// Try to acquire the semaphore.
- int tryacquire (u_short n = 0, int flags = 0) const;
+ int tryacquire (u_short n = 0, short flags = 0) const;
/// Try to acquire the semaphore for reading.
- int tryacquire_read (u_short n = 0, int flags = 0) const;
+ int tryacquire_read (u_short n = 0, short flags = 0) const;
/// Try to acquire the semaphore for writing.
- int tryacquire_write (u_short n = 0, int flags = 0) const;
+ int tryacquire_write (u_short n = 0, short flags = 0) const;
/// Release the semaphore.
- int release (u_short n = 0, int flags = 0) const;
+ int release (u_short n = 0, short flags = 0) const;
// = Semaphore operation methods.
- int op (int val, u_short n = 0, int flags = 0) const;
+ int op (short val, u_short n = 0, short flags = 0) const;
int op (sembuf op_vec[], u_short n) const;
// = Semaphore control methods.
diff --git a/ace/SV_Semaphore_Complex.inl b/ace/SV_Semaphore_Complex.inl
index f9586f10229..8b80748ebf5 100644
--- a/ace/SV_Semaphore_Complex.inl
+++ b/ace/SV_Semaphore_Complex.inl
@@ -5,56 +5,56 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE int
-ACE_SV_Semaphore_Complex::acquire (u_short n, int flags) const
+ACE_SV_Semaphore_Complex::acquire (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::acquire");
return ACE_SV_Semaphore_Simple::acquire ((u_short) n + 2, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Complex::acquire_read (u_short n, int flags) const
+ACE_SV_Semaphore_Complex::acquire_read (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::acquire_read");
return this->acquire (n, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Complex::acquire_write (u_short n, int flags) const
+ACE_SV_Semaphore_Complex::acquire_write (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::acquire_write");
return this->acquire (n, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Complex::tryacquire (u_short n, int flags) const
+ACE_SV_Semaphore_Complex::tryacquire (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::tryacquire");
return ACE_SV_Semaphore_Simple::tryacquire ((u_short) n + 2, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Complex::tryacquire_read (u_short n, int flags) const
+ACE_SV_Semaphore_Complex::tryacquire_read (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::tryacquire_read");
return this->tryacquire (n, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Complex::tryacquire_write (u_short n, int flags) const
+ACE_SV_Semaphore_Complex::tryacquire_write (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::tryacquire_write");
return this->tryacquire (n, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Complex::release (u_short n, int flags) const
+ACE_SV_Semaphore_Complex::release (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::release");
return ACE_SV_Semaphore_Simple::release ((u_short) n + 2, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Complex::op (int val, u_short n, int flags) const
+ACE_SV_Semaphore_Complex::op (short val, u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Complex::op");
return ACE_SV_Semaphore_Simple::op (val, (u_short) n + 2, flags);
diff --git a/ace/SV_Semaphore_Simple.cpp b/ace/SV_Semaphore_Simple.cpp
index 6dcc847c3d7..42fac9be0c7 100644
--- a/ace/SV_Semaphore_Simple.cpp
+++ b/ace/SV_Semaphore_Simple.cpp
@@ -56,7 +56,7 @@ ACE_SV_Semaphore_Simple::init (key_t k, int i)
// specific amount (positive or negative; amount can`t be zero).
int
-ACE_SV_Semaphore_Simple::op (int val, u_short n, int flags) const
+ACE_SV_Semaphore_Simple::op (short val, u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::op");
sembuf op_op;
@@ -77,10 +77,10 @@ ACE_SV_Semaphore_Simple::op (int val, u_short n, int flags) const
int
ACE_SV_Semaphore_Simple::open (key_t k,
- int flags,
+ short flags,
int initial_value,
u_short n,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::open");
union semun ivalue;
@@ -106,10 +106,10 @@ ACE_SV_Semaphore_Simple::open (key_t k,
}
ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (key_t k,
- int flags,
+ short flags,
int initial_value,
u_short n,
- int perms)
+ mode_t perms)
: key_ (k)
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple");
@@ -154,10 +154,10 @@ ACE_SV_Semaphore_Simple::name_2_key (const char *name)
int
ACE_SV_Semaphore_Simple::open (const char *name,
- int flags,
+ short flags,
int initial_value,
u_short n,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::open");
@@ -172,10 +172,10 @@ ACE_SV_Semaphore_Simple::open (const char *name,
}
ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (const char *name,
- int flags,
+ short flags,
int initial_value,
u_short n,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple");
if (this->open (name,
@@ -190,10 +190,10 @@ ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (const char *name,
#if defined (ACE_HAS_WCHAR)
ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple (const wchar_t *name,
- int flags,
+ short flags,
int initial_value,
u_short nsems,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::ACE_SV_Semaphore_Simple(wchar_t)");
if (this->open (ACE_Wide_To_Ascii (name).char_rep (),
diff --git a/ace/SV_Semaphore_Simple.h b/ace/SV_Semaphore_Simple.h
index 54ea45e17e1..af999654f0f 100644
--- a/ace/SV_Semaphore_Simple.h
+++ b/ace/SV_Semaphore_Simple.h
@@ -60,46 +60,46 @@ public:
// = Initialization and termination methods.
ACE_SV_Semaphore_Simple (void);
ACE_SV_Semaphore_Simple (key_t key,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
ACE_SV_Semaphore_Simple (const char *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
#if defined (ACE_HAS_WCHAR)
ACE_SV_Semaphore_Simple (const wchar_t *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
#endif /* ACE_HAS_WCHAR */
~ACE_SV_Semaphore_Simple (void);
int open (const char *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
#if defined (ACE_HAS_WCHAR)
int open (const wchar_t *name,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
#endif /* ACE_HAS_WCHAR */
/// Open or create one or more SV_Semaphores. We return 0 if all is
/// OK, else -1.
int open (key_t key,
- int flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
+ short flags = ACE_SV_Semaphore_Simple::ACE_CREATE,
int initial_value = 1,
u_short nsems = 1,
- int perms = ACE_DEFAULT_FILE_PERMS);
+ mode_t perms = ACE_DEFAULT_FILE_PERMS);
/// Close a ACE_SV_Semaphore, marking it as invalid for subsequent
/// operations...
@@ -120,31 +120,31 @@ public:
* decrement it by 1 and return. Dijkstra's P operation, Tannenbaums
* DOWN operation.
*/
- int acquire (u_short n = 0, int flags = 0) const;
+ int acquire (u_short n = 0, short flags = 0) const;
/// Acquire a semaphore for reading.
- int acquire_read (u_short n = 0, int flags = 0) const;
+ int acquire_read (u_short n = 0, short flags = 0) const;
/// Acquire a semaphore for writing
- int acquire_write (u_short n = 0, int flags = 0) const;
+ int acquire_write (u_short n = 0, short flags = 0) const;
/// Non-blocking version of <acquire>.
- int tryacquire (u_short n = 0, int flags = 0) const;
+ int tryacquire (u_short n = 0, short flags = 0) const;
/// Try to acquire the semaphore for reading.
- int tryacquire_read (u_short n = 0, int flags = 0) const;
+ int tryacquire_read (u_short n = 0, short flags = 0) const;
/// Try to acquire the semaphore for writing.
- int tryacquire_write (u_short n = 0, int flags = 0) const;
+ int tryacquire_write (u_short n = 0, short flags = 0) const;
/// Increment ACE_SV_Semaphore by one. Dijkstra's V operation,
/// Tannenbaums UP operation.
- int release (u_short n = 0, int flags = 0) const;
+ int release (u_short n = 0, short flags = 0) const;
// = Semaphore operation methods.
/// General ACE_SV_Semaphore operation. Increment or decrement by a
/// specific amount (positive or negative; amount can`t be zero).
- int op (int val, u_short semnum = 0, int flags = SEM_UNDO) const;
+ int op (short val, u_short semnum = 0, short flags = SEM_UNDO) const;
/// General ACE_SV_Semaphore operation on an array of SV_Semaphores.
int op (sembuf op_vec[], u_short nsems) const;
diff --git a/ace/SV_Semaphore_Simple.inl b/ace/SV_Semaphore_Simple.inl
index 0ac155d6c9d..5dde75ffff6 100644
--- a/ace/SV_Semaphore_Simple.inl
+++ b/ace/SV_Semaphore_Simple.inl
@@ -12,10 +12,10 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// to the narrow-char open().
ACE_INLINE int
ACE_SV_Semaphore_Simple::open (const wchar_t *name,
- int flags,
+ short flags,
int initial_value,
u_short nsems,
- int perms)
+ mode_t perms)
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::open (wchar_t)");
return this->open (ACE_Wide_To_Ascii (name).char_rep (),
@@ -61,21 +61,21 @@ ACE_SV_Semaphore_Simple::op (sembuf op_vec[], u_short n) const
// DOWN operation.
ACE_INLINE int
-ACE_SV_Semaphore_Simple::acquire (u_short n, int flags) const
+ACE_SV_Semaphore_Simple::acquire (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire");
return this->op (-1, n, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Simple::acquire_read (u_short n, int flags) const
+ACE_SV_Semaphore_Simple::acquire_read (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire_read");
return this->acquire (n, flags);
}
ACE_INLINE int
-ACE_SV_Semaphore_Simple::acquire_write (u_short n, int flags) const
+ACE_SV_Semaphore_Simple::acquire_write (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::acquire_write");
return this->acquire (n, flags);
@@ -84,7 +84,7 @@ ACE_SV_Semaphore_Simple::acquire_write (u_short n, int flags) const
// Non-blocking version of acquire().
ACE_INLINE int
-ACE_SV_Semaphore_Simple::tryacquire (u_short n, int flags) const
+ACE_SV_Semaphore_Simple::tryacquire (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire");
return this->op (-1, n, flags | IPC_NOWAIT);
@@ -93,7 +93,7 @@ ACE_SV_Semaphore_Simple::tryacquire (u_short n, int flags) const
// Non-blocking version of acquire().
ACE_INLINE int
-ACE_SV_Semaphore_Simple::tryacquire_read (u_short n, int flags) const
+ACE_SV_Semaphore_Simple::tryacquire_read (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire_read");
return this->tryacquire (n, flags);
@@ -102,7 +102,7 @@ ACE_SV_Semaphore_Simple::tryacquire_read (u_short n, int flags) const
// Non-blocking version of acquire().
ACE_INLINE int
-ACE_SV_Semaphore_Simple::tryacquire_write (u_short n, int flags) const
+ACE_SV_Semaphore_Simple::tryacquire_write (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::tryacquire_write");
return this->tryacquire (n, flags);
@@ -112,7 +112,7 @@ ACE_SV_Semaphore_Simple::tryacquire_write (u_short n, int flags) const
// Tannenbaums UP operation.
ACE_INLINE int
-ACE_SV_Semaphore_Simple::release (u_short n, int flags) const
+ACE_SV_Semaphore_Simple::release (u_short n, short flags) const
{
ACE_TRACE ("ACE_SV_Semaphore_Simple::release");
return this->op (1, n, flags);
diff --git a/ace/TTY_IO.cpp b/ace/TTY_IO.cpp
index d3fa53fe17c..45a8673fafd 100644
--- a/ace/TTY_IO.cpp
+++ b/ace/TTY_IO.cpp
@@ -462,9 +462,9 @@ int ACE_TTY_IO::control (Control_Mode cmd, Serial_Params *arg) const
// Always set limits unless set to negative to use default.
if (arg->xonlim >= 0)
- dcb.XonLim = arg->xonlim;
+ dcb.XonLim = (WORD)arg->xonlim;
if (arg->xofflim >= 0)
- dcb.XoffLim = arg->xofflim;
+ dcb.XoffLim = (WORD)arg->xofflim;
dcb.fAbortOnError = FALSE;
dcb.fErrorChar = FALSE;
diff --git a/ace/UUID.cpp b/ace/UUID.cpp
index 89436bf2011..d187a455740 100644
--- a/ace/UUID.cpp
+++ b/ace/UUID.cpp
@@ -371,8 +371,8 @@ namespace ACE_Utils
u_char cseqHAV;
{
ACE_GUARD (ACE_SYNCH_MUTEX, mon, *lock_);
- uuid.clockSeqLow (uuid_state_.clockSequence & 0xFF);
- cseqHAV = (uuid_state_.clockSequence & 0x3f00) >> 8;
+ uuid.clockSeqLow (static_cast<u_char> (uuid_state_.clockSequence) & 0xFF);
+ cseqHAV = (static_cast<u_char> (uuid_state_.clockSequence) & 0x3f00) >> 8;
uuid_state_.timestamp = timestamp;
}
@@ -418,7 +418,7 @@ namespace ACE_Utils
// Account for the clock being set back. Increment the clock /
// sequence.
if (timestamp <= timeLast_)
- uuid_state_.clockSequence = (uuid_state_.clockSequence + 1) & ACE_UUID_CLOCK_SEQ_MASK;
+ uuid_state_.clockSequence = static_cast<u_char> ((uuid_state_.clockSequence + 1) & ACE_UUID_CLOCK_SEQ_MASK);
// If the system time ticked since the last UUID was
// generated. Set / the clock sequence back.
diff --git a/ace/WIN32_Asynch_IO.cpp b/ace/WIN32_Asynch_IO.cpp
index 63b5ed4f63f..d638761d121 100644
--- a/ace/WIN32_Asynch_IO.cpp
+++ b/ace/WIN32_Asynch_IO.cpp
@@ -2578,9 +2578,7 @@ ACE_WIN32_Asynch_Connect::connect_i (ACE_WIN32_Asynch_Connect_Result *result,
result->set_error (errno);
}
return 1 ; // connect finished
- }
-
- ACE_NOTREACHED (return 0);
+ }
}
diff --git a/apps/gperf/src/Gen_Perf.cpp b/apps/gperf/src/Gen_Perf.cpp
index da925e89b63..88c362e0218 100644
--- a/apps/gperf/src/Gen_Perf.cpp
+++ b/apps/gperf/src/Gen_Perf.cpp
@@ -102,7 +102,7 @@ Gen_Perf::sort_set (char *union_set, int len)
curr--)
union_set[curr] = union_set[curr - 1];
- union_set[curr] = tmp;
+ union_set[curr] = static_cast<char> (tmp);
}
}
diff --git a/apps/gperf/src/Key_List.cpp b/apps/gperf/src/Key_List.cpp
index 61b91f403c7..e954c075e8a 100644
--- a/apps/gperf/src/Key_List.cpp
+++ b/apps/gperf/src/Key_List.cpp
@@ -137,7 +137,7 @@ Key_List::special_input (char delimiter)
delete [] buf;
buf = temp;
}
- buf[i] = c;
+ buf[i] = static_cast<char> (c);
}
return 0;
@@ -256,7 +256,7 @@ Key_List::read_keys (void)
delimiter))),
-1);
for (temp = this->head;
- (buffer = input.read ('\n'))
+ (0 != (buffer = input.read ('\n')))
&& ACE_OS::strcmp (buffer, "%%");
temp = temp->next)
{
diff --git a/apps/gperf/src/List_Node.cpp b/apps/gperf/src/List_Node.cpp
index 38c12201403..e3ef88ed7e0 100644
--- a/apps/gperf/src/List_Node.cpp
+++ b/apps/gperf/src/List_Node.cpp
@@ -42,7 +42,7 @@ List_Node::sort (char *base, int len)
{
char curr, tmp;
- for (curr = i + 1, tmp = base[curr];
+ for (curr = static_cast<char> (i + 1), tmp = base[curr];
curr > 0 && tmp < base[curr-1];
curr--)
base[curr] = base[curr - 1];
@@ -81,7 +81,7 @@ List_Node::List_Node (char *k, int len)
if (option[STRCASECMP])
for (char *p = k; *p; p++)
if (isupper (*p))
- *p = tolower (*p);
+ *p = static_cast<char> (tolower (*p));
if (option[ALLCHARS]) // Use all the character position in the KEY.
for (; *k; k++, ptr++)
diff --git a/apps/gperf/src/Options.cpp b/apps/gperf/src/Options.cpp
index c3089943c9b..4251d7c7c39 100644
--- a/apps/gperf/src/Options.cpp
+++ b/apps/gperf/src/Options.cpp
@@ -129,7 +129,7 @@ Options::key_sort (char *base, int len)
// Oh no, a duplicate!!!
return 0;
- base[curr] = tmp;
+ base[curr] = static_cast<char> (tmp);
}
return 1;
@@ -523,7 +523,7 @@ Options::parse_args (int argc, char *argv[])
usage),
-1);
else
- *l_key_pos = value;;
+ *l_key_pos = static_cast<char> (value);
*l_key_pos = EOS;
diff --git a/protocols/ace/HTBP/HTBP_ID_Requestor.cpp b/protocols/ace/HTBP/HTBP_ID_Requestor.cpp
index 66d3ef7cd93..d46b16d0e3b 100644
--- a/protocols/ace/HTBP/HTBP_ID_Requestor.cpp
+++ b/protocols/ace/HTBP/HTBP_ID_Requestor.cpp
@@ -65,7 +65,7 @@ ACE::HTBP::ID_Requestor::connect_to_server (ACE_SOCK_Stream *cli_stream)
host_ = url_.substr(host_start,port_sep - host_start);
}
- ACE_INET_Addr remote_addr (port_, host_.c_str());
+ ACE_INET_Addr remote_addr (static_cast<u_short> (port_), host_.c_str());
ACE_SOCK_Connector con;
if (con.connect (*cli_stream,
remote_addr) == -1)