unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* compiling with -Wwrite-strings
@ 2010-08-09 20:15 Dan Nicolaescu
  2010-08-09 21:23 ` Juanma Barranquero
  2010-08-11  8:24 ` Jan Djärv
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2010-08-09 20:15 UTC (permalink / raw)
  To: emacs-devel


It would be nice if using -Wwrite-strings would produce fewer warnings.
A lot of them have been removed in the past few days, but there's still some left
(lib-src has a lot)

Most are easy to fix: just use "const char*" instead of "char*" for
function arguments, variables, struct fields, etc.

Help doing this would be appreciated.



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

* Re: compiling with -Wwrite-strings
  2010-08-09 20:15 compiling with -Wwrite-strings Dan Nicolaescu
@ 2010-08-09 21:23 ` Juanma Barranquero
  2010-08-09 22:04   ` Dan Nicolaescu
  2010-08-11  8:24 ` Jan Djärv
  1 sibling, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2010-08-09 21:23 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

On Mon, Aug 9, 2010 at 22:15, Dan Nicolaescu <dann@gnu.org> wrote:

> Most are easy to fix: just use "const char*" instead of "char*" for
> function arguments, variables, struct fields, etc.

BTW:

font.c: In function 'font_parse_xlfd':
font.c:997: warning: assignment discards qualifiers from pointer target type
font.c:1000: warning: assignment discards qualifiers from pointer target type
font.c:1007: warning: assignment discards qualifiers from pointer target type
font.c: In function 'font_parse_fcname':
font.c:1319: warning: assignment discards qualifiers from pointer target type
font.c:1455: warning: assignment discards qualifiers from pointer target type
font.c: In function 'font_unparse_fcname':
font.c:1645: warning: assignment discards qualifiers from pointer target type

> Help doing this would be appreciated.

If it is still needed I'll try to tackle this once I'm back (Aug, 18).

    Juanma



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

* Re: compiling with -Wwrite-strings
  2010-08-09 21:23 ` Juanma Barranquero
@ 2010-08-09 22:04   ` Dan Nicolaescu
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2010-08-09 22:04 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

Juanma Barranquero <lekktu@gmail.com> writes:

> On Mon, Aug 9, 2010 at 22:15, Dan Nicolaescu <dann@gnu.org> wrote:
>
>> Most are easy to fix: just use "const char*" instead of "char*" for
>> function arguments, variables, struct fields, etc.
>
> BTW:
>
> font.c: In function 'font_parse_xlfd':
> font.c:997: warning: assignment discards qualifiers from pointer target type
> font.c:1000: warning: assignment discards qualifiers from pointer target type
> font.c:1007: warning: assignment discards qualifiers from pointer target type
> font.c: In function 'font_parse_fcname':
> font.c:1319: warning: assignment discards qualifiers from pointer target type
> font.c:1455: warning: assignment discards qualifiers from pointer target type
> font.c: In function 'font_unparse_fcname':
> font.c:1645: warning: assignment discards qualifiers from pointer target type

Thanks, this should be fixed now.



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

* Re: compiling with -Wwrite-strings
  2010-08-09 20:15 compiling with -Wwrite-strings Dan Nicolaescu
  2010-08-09 21:23 ` Juanma Barranquero
@ 2010-08-11  8:24 ` Jan Djärv
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Djärv @ 2010-08-11  8:24 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel



Dan Nicolaescu skrev 2010-08-09 22.15:
>
> It would be nice if using -Wwrite-strings would produce fewer warnings.
> A lot of them have been removed in the past few days, but there's still some left
> (lib-src has a lot)

I fixed lib-src, except regexp.c which compiles here, but is located in src.

	Jan D.



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

end of thread, other threads:[~2010-08-11  8:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 20:15 compiling with -Wwrite-strings Dan Nicolaescu
2010-08-09 21:23 ` Juanma Barranquero
2010-08-09 22:04   ` Dan Nicolaescu
2010-08-11  8:24 ` Jan Djärv

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