Gireesh Nagabhushana wrote:
cstyle is reporting "possible left brace starting a line" for these lines.

    769         struct cxgen_ident {
    770                 uint16_t        device; /* pci device-id */
    771                 int             index;  /* index into t3_adap_info */
    772         } *ci, cxgen_identifiers[] = {
    773                 {0x20, 0},  /* PE9000 */
    774                 {0x21, 1},  /* T302E */
    775                 {0x22, 2},  /* T310E */
    776                 {0x23, 3},  /* T320X */
    777                 {0x24, 1},  /* T302X */
    778                 {0x25, 3},  /* T320E */
    779                 {0x26, 2},  /* T310X */
    780                 {0x30, 2},  /* T3B10 */
    781                 {0x31, 3},  /* T3B20 */
    782                 {0x32, 1},  /* T3B02 */
    783                 {0x33, 4},  /* T3B04 */
    784                 {0x35, 6},  /* N310E */
    785                 {0x36, 3},  /* LP-CR */
    786                 {0x37, 7},  /* Gen 2 */
    787                 { 0, -1 }
    788         };

bash-3.2# cstyle -chpP cxgen.c
cxgen.c: 773: possible left brace starting a line
cxgen.c: 774: possible left brace starting a line
cxgen.c: 775: possible left brace starting a line
cxgen.c: 776: possible left brace starting a line
cxgen.c: 777: possible left brace starting a line
cxgen.c: 778: possible left brace starting a line
cxgen.c: 779: possible left brace starting a line
cxgen.c: 780: possible left brace starting a line
cxgen.c: 781: possible left brace starting a line
cxgen.c: 782: possible left brace starting a line
cxgen.c: 783: possible left brace starting a line
cxgen.c: 784: possible left brace starting a line
cxgen.c: 785: possible left brace starting a line
cxgen.c: 786: possible left brace starting a line
cxgen.c: 787: possible left brace starting a line

It is expecting all those lines to start from 1st column which shouldn't be. 
This looks like a bug in cstyle.

-- Gireesh

That's odd. I copied the code above to a file, and I see no errors from cstyle -chpP.

        Scott


--
Scott Rotondo
Principal Engineer, Solaris Security Technologies
President, Trusted Computing Group
Phone/FAX: +1 408 850 3655 (Internal x68278)
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to