Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-02-15 20:49:25 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-02-15 20:49:25 +0300
commiteb8a6636bfd7e9cbc7f8ce2c774334a61385992e (patch)
tree80970641744a4697b6608e29502ce00a4aa73538 /winsup/cygwin/posix_ipc.cc
parent93162be554b758a64cd35cfdea61fa1c7a1f8c3f (diff)
* posix_ipc.cc (mq_open): Avoid compiler warning. Initialize mqhdr
before using it in file exists case. * include/mqueue.h (mqd_t): Make non-pointer type.
Diffstat (limited to 'winsup/cygwin/posix_ipc.cc')
-rw-r--r--winsup/cygwin/posix_ipc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc
index a0a38d2fc..c286b2483 100644
--- a/winsup/cygwin/posix_ipc.cc
+++ b/winsup/cygwin/posix_ipc.cc
@@ -279,7 +279,7 @@ mq_open (const char *name, int oflag, ...)
{
int i, fd, nonblock, created;
long msgsize, index;
- _off64_t filesize;
+ _off64_t filesize = 0;
va_list ap;
mode_t mode;
int8_t *mptr;
@@ -427,7 +427,7 @@ exists:
/* Allocate one mq_info{} for each open */
if (!(mqinfo = (struct mq_info *) malloc (sizeof (struct mq_info))))
goto err;
- mqinfo->mqi_hdr = (struct mq_hdr *) mptr;
+ mqinfo->mqi_hdr = mqhdr = (struct mq_hdr *) mptr;
mqinfo->mqi_magic = MQI_MAGIC;
mqinfo->mqi_flags = nonblock;