Ticket #1389 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

code cleanup

Reported by: winnie Owned by: winnie
Priority: major Milestone: 4.7.0-pre1
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: angel_il slavazanko

Description (last modified by winnie) (diff)

there are some compiler warnings which needs a fix:

setup.c: In function 'setup__move_panels_config_into_separate_file': 
setup.c:536: warning: assignment discards qualifiers from pointer target type 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c slint.c 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c subshell.c 
subshell.c: In function 'init_subshell': 
subshell.c:510: warning: too many arguments for format      
complete.c: In function 'try_complete': 
complete.c:767: warning: passing argument 2 of 'completion_matches' from incompatible pointer type 
complete.c:804: warning: passing argument 2 of 'completion_matches' from incompatible pointer type 
complete.c:811: warning: passing argument 2 of 'completion_matches' from incompatible pointer type 
complete.c:835: warning: passing argument 2 of 'completion_matches' from incompatible pointer type 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c cons.handler.c 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c dialog.c 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c dir.c 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c execute.c 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c ext.c 
cc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\""/usr/share/mc/"\" -DLOCALEDIR=\""/usr/share/locale"\" -DSAVERDIR=\""/usr/lib/mc/mc"\" -DSYSCONFDIR=\""/etc/mc/"\" -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I.. -g -O2 -g -Wall -O2 -c file.c 
file.c: In function 'transform_source': 
file.c:166: warning: passing argument 1 of 'str_fix_string' discards qualifiers from pointer target type

Change History

comment:1 Changed 15 years ago by winnie

  • Description modified (diff)

comment:2 Changed 15 years ago by winnie

  • Description modified (diff)

comment:3 Changed 15 years ago by slavazanko

  • Version changed from 4.6.2 to master

This will fixed at near time.

comment:4 Changed 15 years ago by winnie

  • Status changed from new to accepted
  • severity changed from no branch to on rework

See branch 1389_code_cleanup

comment:5 Changed 15 years ago by angel_il

comment:6 Changed 15 years ago by slyfox

  • severity changed from on rework to on review

Fixed large bunch of warnings. Some were tcc compilation failures (completion stuff).

Please, give it a good testing.

comment:8 Changed 15 years ago by slyfox

Start: a2979820146b394fb200a4d9a60315be52923563
Tip: 52417e4c61a514a3c4e07bc540debbf1af13106d

Added fixes/code clarification for -Wwrite-strings

comment:9 Changed 15 years ago by slavazanko

changeset:1dc7507fb2212174eeef7a65925e76703c3e7382

Appempt to build project with:

make CFLAGS="-Wall -Wextra -Werror -pedantic -ansi -Wno-long-long -Wwrite-strings"

comment:10 Changed 15 years ago by slavazanko

Branch rebased. Now just escaped '%' for avoid warning

changeset:c831c5e571794dca3130009897e42c2270553958

comment:11 Changed 15 years ago by angel_il

  • Votes for changeset set to angel_il

comment:13 Changed 15 years ago by slavazanko

  • Votes for changeset changed from angel_il to angel_il slavazanko
  • severity changed from on review to approved

comment:14 Changed 15 years ago by slavazanko

  • Status changed from accepted to testing
  • Resolution set to fixed

comment:15 Changed 15 years ago by slavazanko

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.