>Number: 154409 >Category: misc >Synopsis: Indent bug report >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 31 06:50:06 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Li >Release: 8.0 release >Organization: >Environment: FreeBSD PC-686.Workstation 8.0-RELEASE-p5 FreeBSD 8.0-RELEASE-p5 #4: Fri Oct 15 17:57:04 CST 2010 root@PC-686.Workstation:/usr/obj/usr/src/sys/MYKERNEL amd64 >Description: I found two bugs of indnet(1).
>How-To-Repeat: Here is a pieces of C codes: /******************************************************************************/ /* * example.c */ /******************************************************************************/ void example(void) { /* The first empty statement ";" indicates the first bug. */ /* Without this empty statement, indent(1) can handle the switch statement properly. */ /* The "case 1" will be wrong. */ ; switch (p_stage_3_parameter->s_3_mutation_method) { case 1: example_01(); break; case 2: example_02(); break; default: printf("Error.\n"); break; } if () { } else /* This comment indicates the second bug. */ { /* A comment following an "else" statement always cause an error. */ } } /******************************************************************************/ Here is my .indent.pro: -TFILE -Tfd_mask -Tfd_set -Tlinker_sym_tT -Tu_char -Tu_int -Tu_long -Tu_short -TTAILQ_HEAD -TTAILQ_ENTRY -TLIST_HEAD -TLIST_ENTRY -TSTAILQ_HEAD -TSTAILQ_ENTRY -TSLIST_HEAD -TSLIST_ENTRY -bad -bap -bbb -bc -bl -c81 -cd81 -cdb -nce -ci8 -cli0 -d0 -di8 -ndj -ei -nfc1 -nfcb -i8 -ip8 -l140 -lc140 -ldi0 -lp -npcs -psl -sc -nsob -nv -nfbs And I use gvim (I think this doesn't matter) to write C codes. >Fix: >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"