all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: phst@google.com, p.stephani2@gmail.com, emacs-devel@gnu.org
Subject: Re: [PATCH] Clean up a couple of compiler warnings
Date: Fri, 19 May 2017 09:53:46 +0300	[thread overview]
Message-ID: <83a86949s5.fsf@gnu.org> (raw)
In-Reply-To: <e1c93027-c635-c5f0-38fc-c59324657d7d@cs.ucla.edu> (message from Paul Eggert on Thu, 18 May 2017 20:48:42 -0700)

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Thu, 18 May 2017 20:48:42 -0700
> Cc: Philipp Stephani <phst@google.com>
> 
>  > * fileio.c (file_name_case_insensitive_p): Add cast.
> 
> Rather than waste time static-checking the DARWIN_OS_CASE_SENSITIVE_FIXME == 2 
> code let's just #ifdef it out. I did that in the 4th attached patch. Maybe we 
> should just remove it, since nobody is using it and (as you note) it doesn't 
> work anyway.
> [...]
> diff --git a/src/fileio.c b/src/fileio.c
> index acbf76e..e5e3505 100644
> --- a/src/fileio.c
> +++ b/src/fileio.c
> @@ -2294,10 +2294,14 @@ file_name_case_insensitive_p (const char *filename)
>  		      & VOL_CAP_FMT_CASE_SENSITIVE);
>  	}
>      }
> -  else if (DARWIN_OS_CASE_SENSITIVE_FIXME == 2)
> +# if DARWIN_OS_CASE_SENSITIVE_FIXME == 2
>      {
>        /* The following is based on
> -	 http://lists.apple.com/archives/darwin-dev/2007/Apr/msg00010.html.  */
> +	 http://lists.apple.com/archives/darwin-dev/2007/Apr/msg00010.html.
> +	 It is normally not even compiled, since it runs afoul of
> +	 static checking.  See:
> +	 http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html
> +         */
>        struct attrlist alist;
>        unsigned char buffer[sizeof (vol_capabilities_attr_t) + sizeof (size_t)];
>  
> @@ -2309,6 +2313,7 @@ file_name_case_insensitive_p (const char *filename)
>        vol_capabilities_attr_t *vcaps = buffer;
>        return !(vcaps->capabilities[0] & VOL_CAP_FMT_CASE_SENSITIVE);
>      }
> +# endif
>  #endif	/* DARWIN_OS */

Should we make the DARWIN_OS_CASE_SENSITIVE_FIXME == 1 case an ifdef
as well?  It feels strange to try to avoid the ifdef for one value,
but not for the other.

Thanks for this and the other changes.



  reply	other threads:[~2017-05-19  6:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 20:24 [PATCH] Clean up a couple of compiler warnings Philipp Stephani
2017-05-18 20:40 ` Eli Zaretskii
2017-05-19  3:48 ` Paul Eggert
2017-05-19  6:53   ` Eli Zaretskii [this message]
2017-05-19  6:55     ` Paul Eggert
2017-05-19  9:31   ` Philipp Stephani
2017-05-21  6:07     ` Paul Eggert
2017-05-21 20:00       ` Philipp Stephani
2017-05-21 20:33         ` Paul Eggert
2017-05-23 10:17           ` Philipp Stephani
2017-05-23 17:36             ` Paul Eggert
2017-05-23 19:19               ` Eli Zaretskii
2017-05-23 19:21               ` Philipp Stephani
2017-05-21 20:47         ` Perry E. Metzger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a86949s5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=phst@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.