summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-07 08:13:28 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-07 08:13:28 +0000
commit283ab3120c2fd8986c75b95419ea13eb54ba52e6 (patch)
treedacabed69662bb6443418177c1cf1b9fe5abb462
parent12e828d94172e18989231a70960ce5fe02b76e8f (diff)
downloadATCD-283ab3120c2fd8986c75b95419ea13eb54ba52e6.tar.gz
.
-rw-r--r--TAO/examples/POA/DSI/client.cpp7
-rw-r--r--TAO/examples/POA/Default_Servant/client.cpp6
-rw-r--r--examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp31
3 files changed, 30 insertions, 14 deletions
diff --git a/TAO/examples/POA/DSI/client.cpp b/TAO/examples/POA/DSI/client.cpp
index a2f9076e2bc..f8f581698c9 100644
--- a/TAO/examples/POA/DSI/client.cpp
+++ b/TAO/examples/POA/DSI/client.cpp
@@ -21,8 +21,8 @@
ACE_RCSID(DSI, client, "$Id$")
-static char *IOR = 0;
-static char *IOR_file = 0;
+static const char *IOR = 0;
+static const char *IOR_file = 0;
static int shutdown_server = 0;
static int
@@ -60,7 +60,8 @@ parse_args (int argc, char **argv)
if (IOR == 0 && IOR_file == 0)
ACE_ERROR_RETURN ((LM_ERROR,
- "Please specify the IOR or IOR_file for the servant\n"), -1);
+ "Please specify the IOR or IOR_file for the servant\n"),
+ -1);
// Indicates successful parsing of command line.
return 0;
diff --git a/TAO/examples/POA/Default_Servant/client.cpp b/TAO/examples/POA/Default_Servant/client.cpp
index 917d0bbe412..f031e9f6874 100644
--- a/TAO/examples/POA/Default_Servant/client.cpp
+++ b/TAO/examples/POA/Default_Servant/client.cpp
@@ -23,9 +23,9 @@
ACE_RCSID(Default_Servant, client, "$Id$")
-static char *iorfile = 0;
-static char *filename = "test";
-static char *message = "POA rules!!";
+static const char *iorfile = 0;
+static const char *filename = "test";
+static const char *message = "POA rules!!";
static int
parse_args (int argc, char **argv)
diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp
index 02dd75036d2..3e690a7bfdb 100644
--- a/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp
+++ b/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp
@@ -26,7 +26,7 @@ do_child (ACE_FIFO_Recv &fifo_reader)
return -1;
char *argv[2];
- argv[0] = EXEC_COMMAND_ARG;
+ argv[0] = (char *) EXEC_COMMAND_ARG;
argv[1] = 0;
if (ACE_OS::execvp (EXEC_NAME, argv) == -1)
@@ -39,13 +39,14 @@ do_parent (const char fifo_name[],
char input_filename[])
{
ACE_FIFO_Send fifo_sender (fifo_name, O_WRONLY | O_CREAT);
- int len;
+ ssize_t len;
char buf[BUFSIZ];
if (fifo_sender.get_handle () == ACE_INVALID_HANDLE)
return -1;
- ACE_HANDLE inputfd = ACE_OS::open (input_filename, O_RDONLY);
+ ACE_HANDLE inputfd =
+ ACE_OS::open (input_filename, O_RDONLY);
if (inputfd == ACE_INVALID_HANDLE)
return -1;
@@ -70,7 +71,9 @@ main (int argc, char *argv[])
ACE_LOG_MSG->open (argv[0]);
if (argc != 2)
- ACE_ERROR ((LM_ERROR, "usage: %n input-file\n%a", 1));
+ ACE_ERROR ((LM_ERROR,
+ "usage: %n input-file\n%a",
+ 1));
ACE_FIFO_Recv fifo_reader (FIFO_NAME, O_RDONLY | O_CREAT, PERMS, 0);
@@ -82,17 +85,29 @@ main (int argc, char *argv[])
switch (child_pid)
{
case -1:
- ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "fork", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%n: %p\n%a",
+ "fork",
+ 1));
case 0:
if (do_child (fifo_reader) == -1)
- ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "do_child", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%n: %p\n%a",
+ "do_child",
+ 1));
default:
if (do_parent (FIFO_NAME, argv[1]) == -1)
- ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "do_parent", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%n: %p\n%a",
+ "do_parent",
+ 1));
// wait for child to ACE_OS::exit.
if (ACE_OS::waitpid (child_pid, (int *) 0, 0) == -1)
- ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "waitpid", 1));
+ ACE_ERROR ((LM_ERROR,
+ "%n: %p\n%a",
+ "waitpid",
+ 1));
}
return 0;