unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Long standing warnings in C files.
@ 2007-09-16 14:49 Michaël Cadilhac
  2007-09-18 13:49 ` Michaël Cadilhac
  2007-09-19 10:12 ` Michaël Cadilhac
  0 siblings, 2 replies; 3+ messages in thread
From: Michaël Cadilhac @ 2007-09-16 14:49 UTC (permalink / raw)
  To: emacs-devel


[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Long standing warnings in C files.
  2007-09-16 14:49 Long standing warnings in C files Michaël Cadilhac
@ 2007-09-18 13:49 ` Michaël Cadilhac
  2007-09-19 10:12 ` Michaël Cadilhac
  1 sibling, 0 replies; 3+ messages in thread
From: Michaël Cadilhac @ 2007-09-18 13:49 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1594 bytes --]

michael@cadilhac.name (Michaël Cadilhac) writes:

> 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 :
>
> 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

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

Uh oh, only one day before my free will decides that a few days has
elapsed, hence launching the (nearly) unreversable procedure of
installing the proposed patch! :-)

-- 
 |   Michaël `Micha' Cadilhac       |  Ajoutez du whisky                     |
 |   http://michael.cadilhac.name   |           à n'importe quel texte,      |
 |   JID/MSN:                       |    ça vous fera un beau pangramme.     |
 `----  michael.cadilhac@gmail.com  |          -- Michel Clavel         -  --'

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Long standing warnings in C files.
  2007-09-16 14:49 Long standing warnings in C files Michaël Cadilhac
  2007-09-18 13:49 ` Michaël Cadilhac
@ 2007-09-19 10:12 ` Michaël Cadilhac
  1 sibling, 0 replies; 3+ messages in thread
From: Michaël Cadilhac @ 2007-09-19 10:12 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 536 bytes --]

michael@cadilhac.name (Michaël Cadilhac) writes:

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

Et à la fin de l'envoi, je touche !

  Installed.

-- 
 |   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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-19 10:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-16 14:49 Long standing warnings in C files Michaël Cadilhac
2007-09-18 13:49 ` Michaël Cadilhac
2007-09-19 10:12 ` Michaël Cadilhac

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).