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>
+
+ * 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
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);
if (strcmp(*aname, tokval))
goto next;
}
+ }
break;
case PASSWD:
if ((*aname == 0 || strcmp(*aname, "anonymous")) &&
** 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;
/* 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)
{
/* 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;
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;
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)
{
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;