unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: michael@cadilhac.name (Michaël Cadilhac)
To: emacs-devel@gnu.org
Subject: Long standing warnings in C files.
Date: Sun, 16 Sep 2007 16:49:00 +0200	[thread overview]
Message-ID: <878x76fyxv.fsf@cadilhac.name> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 193 bytes --]

There's some long-standing warnings in xterm.c and coding.c that we
probably should get rid of.

I don't think the following patch could break anything, but I prefer
to ask.

Warnings :

[-- Attachment #1.1.2: warnings.txt --]
[-- Type: text/plain, Size: 752 bytes --]

coding.c:4468: warning: passing argument 1 of 'detect_eol_type_in_2_octet_form' discards qualifiers from pointer target type
coding.c:4471: warning: passing argument 1 of 'detect_eol_type_in_2_octet_form' discards qualifiers from pointer target type
coding.c:4474: warning: passing argument 1 of 'detect_eol_type' discards qualifiers from pointer target type
coding.c: In function 'detect_coding_system':
coding.c:6603: warning: passing argument 1 of 'detect_eol_type' discards qualifiers from pointer target type
xterm.c: In function 'handle_one_xevent':
xterm.c:6644: warning: passing argument 2 of 'note_mouse_movement' from incompatible pointer type
xterm.c:6677: warning: passing argument 2 of 'note_mouse_movement' from incompatible pointer type

[-- Attachment #1.1.3: Type: text/plain, Size: 11 bytes --]


Patch :

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.4: warnings.patch --]
[-- Type: text/x-patch, Size: 3231 bytes --]

Index: xterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/xterm.c,v
retrieving revision 1.957
diff -B -w -c -r1.957 xterm.c
*** xterm.c	14 Sep 2007 04:11:26 -0000	1.957
--- xterm.c	16 Sep 2007 14:48:44 -0000
***************
*** 6641,6647 ****
        /* We may get an EnterNotify on the buttons in the toolbar.  In that
           case we moved out of any highlighted area and need to note this.  */
        if (!f && last_mouse_glyph_frame)
!         note_mouse_movement (last_mouse_glyph_frame, &event);
  #endif
        goto OTHER;
  
--- 6641,6647 ----
        /* We may get an EnterNotify on the buttons in the toolbar.  In that
           case we moved out of any highlighted area and need to note this.  */
        if (!f && last_mouse_glyph_frame)
!         note_mouse_movement (last_mouse_glyph_frame, &event.xmotion);
  #endif
        goto OTHER;
  
***************
*** 6674,6680 ****
  #ifdef USE_GTK
        /* See comment in EnterNotify above */
        else if (last_mouse_glyph_frame)
!         note_mouse_movement (last_mouse_glyph_frame, &event);
  #endif
        goto OTHER;
  
--- 6674,6680 ----
  #ifdef USE_GTK
        /* See comment in EnterNotify above */
        else if (last_mouse_glyph_frame)
!         note_mouse_movement (last_mouse_glyph_frame, &event.xmotion);
  #endif
        goto OTHER;
  
Index: coding.c
===================================================================
RCS file: /sources/emacs/emacs/src/coding.c,v
retrieving revision 1.355
diff -B -w -c -r1.355 coding.c
*** coding.c	29 Aug 2007 05:27:58 -0000	1.355
--- coding.c	16 Sep 2007 14:48:47 -0000
***************
*** 4335,4344 ****
  
  static int
  detect_eol_type (source, src_bytes, skip)
!      unsigned char *source;
       int src_bytes, *skip;
  {
!   unsigned char *src = source, *src_end = src + src_bytes;
    unsigned char c;
    int total = 0;		/* How many end-of-lines are found so far.  */
    int eol_type = CODING_EOL_UNDECIDED;
--- 4335,4344 ----
  
  static int
  detect_eol_type (source, src_bytes, skip)
!      const unsigned char *source;
       int src_bytes, *skip;
  {
!   const unsigned char *src = source, *src_end = src + src_bytes;
    unsigned char c;
    int total = 0;		/* How many end-of-lines are found so far.  */
    int eol_type = CODING_EOL_UNDECIDED;
***************
*** 4384,4393 ****
  
  static int
  detect_eol_type_in_2_octet_form (source, src_bytes, skip, big_endian_p)
!      unsigned char *source;
       int src_bytes, *skip, big_endian_p;
  {
!   unsigned char *src = source, *src_end = src + src_bytes;
    unsigned int c1, c2;
    int total = 0;		/* How many end-of-lines are found so far.  */
    int eol_type = CODING_EOL_UNDECIDED;
--- 4384,4393 ----
  
  static int
  detect_eol_type_in_2_octet_form (source, src_bytes, skip, big_endian_p)
!      const unsigned char *source;
       int src_bytes, *skip, big_endian_p;
  {
!   const unsigned char *src = source, *src_end = src + src_bytes;
    unsigned int c1, c2;
    int total = 0;		/* How many end-of-lines are found so far.  */
    int eol_type = CODING_EOL_UNDECIDED;

[-- Attachment #1.1.5: Type: text/plain, Size: 384 bytes --]


If no one complains, I'll install that in a few days.

-- 
 |   Michaël `Micha' Cadilhac       |  I am very sad for you                 |
 |   http://michael.cadilhac.name   |       that you are running             |
 |   JID/MSN:                       |    Windows Vista.                      |
 `----  michael.cadilhac@gmail.com  |          -- RMS                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

             reply	other threads:[~2007-09-16 14:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-16 14:49 Michaël Cadilhac [this message]
2007-09-18 13:49 ` Long standing warnings in C files Michaël Cadilhac
2007-09-19 10:12 ` Michaël Cadilhac

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=878x76fyxv.fsf@cadilhac.name \
    --to=michael@cadilhac.name \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).