* localtime.cc (increment_overflow): Mark as non-inline to prevent compiler

from complaining about the very thing we're trying to test.
* ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error.
* sched.cc (sched_rr_get_interval): Ditto.
* select.cc (peek_serial): Ditto.
* libc/rexec.cc (ruserpass): Ditto.
* posix_ipc.cc (ipc_names): Make static to avoid a compiler warning
(and it's the right thing to do anyway).
This commit is contained in:
Christopher Faylor 2008-09-11 05:43:11 +00:00
parent 81ba2b77de
commit cb7e1879ee
8 changed files with 28 additions and 14 deletions

View File

@ -1,3 +1,14 @@
2008-09-11 Christopher Faylor <me+cygwin@cgf.cx>
* localtime.cc (increment_overflow): Mark as non-inline to prevent
compiler from complaining about the very thing we're trying to test.
* ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error.
* sched.cc (sched_rr_get_interval): Ditto.
* select.cc (peek_serial): Ditto.
* libc/rexec.cc (ruserpass): Ditto.
* posix_ipc.cc (ipc_names): Make static to avoid a compiler warning
(and it's the right thing to do anyway).
2008-09-11 Christopher Faylor <me+cygwin@cgf.cx>
* net.cc (in6addr_any, in6addr_loopback): Add appropriate number of

View File

@ -206,7 +206,7 @@ next:
while ((t = token()) && t != MACH && t != DEFAULT) switch(t) {
case LOGIN:
if (token())
if (token()) {
if (*aname == 0) {
*aname = (char *) malloc((unsigned) strlen(tokval) + 1);
(void) strcpy(*aname, tokval);
@ -214,6 +214,7 @@ next:
if (strcmp(*aname, tokval))
goto next;
}
}
break;
case PASSWD:
if ((*aname == 0 || strcmp(*aname, "anonymous")) &&

View File

@ -1788,7 +1788,8 @@ ctime_r(const time_t *timep, char *buf)
** Simplified normalize logic courtesy Paul Eggert (eggert@twinsun.com).
*/
static int
/* Mark as noinline to prevent a compiler warning. */
static int __attribute__((noinline))
increment_overflow(int *number, int delta)
{
int number0;

View File

@ -65,14 +65,15 @@ read_ea (HANDLE hdl, path_conv &pc, const char *name, char *value, size_t size)
/* Samba hides the user namespace from Windows clients. If we try to
retrieve a user namespace item, we remove the leading namespace from
the name, otherwise the search fails. */
if (pc.fs_is_samba ())
if (ascii_strncasematch (name, "user.", 5))
name += 5;
else
{
set_errno (ENOATTR);
goto out;
}
if (!pc.fs_is_samba ())
/* nothing to do */;
else if (ascii_strncasematch (name, "user.", 5))
name += 5;
else
{
set_errno (ENOATTR);
goto out;
}
if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
{

View File

@ -26,7 +26,7 @@ details. */
/* The prefix_len is the length of the path prefix ncluding trailing "/"
(or "/sem." for semaphores) as well as the trailing NUL. */
struct
static struct
{
const char *prefix;
const size_t prefix_len;

View File

@ -295,7 +295,7 @@ sched_rr_get_interval (pid_t pid, struct timespec *interval)
qindex = 0;
vfindex = ((prisep >> 2) & 3) % 3;
if (vfindex == 0)
vfindex = wincap.is_server () || prisep & 3 == 0 ? 1 : 0;
vfindex = wincap.is_server () || (prisep & 3) == 0 ? 1 : 0;
else
vfindex -= 1;
slindex = ((prisep >> 4) & 3) % 3;

View File

@ -140,7 +140,7 @@ PSID
cygsid::get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known)
{
DWORD i;
SID_IDENTIFIER_AUTHORITY sid_auth = {0,0,0,0,0,0};
SID_IDENTIFIER_AUTHORITY sid_auth = {{0,0,0,0,0,0}};
if (s > 255 || cnt < 1 || cnt > 8)
{

View File

@ -921,7 +921,7 @@ peek_serial (select_record *s, bool)
set_handle_or_return_if_not_open (h, s);
int ready = 0;
if (s->read_selected && s->read_ready || (s->write_selected && s->write_ready))
if ((s->read_selected && s->read_ready) || (s->write_selected && s->write_ready))
{
select_printf ("already ready");
ready = 1;