#2 cvs can't compile

closed
nobody
None
5
2002-09-11
2002-09-05
steven roemen
No

after removing the diag_l0_elm.c and diag_l0_elm.o from
the Makefile, the compile errors out here:

cc -DLINUX -I. -c -o diag_dtc.o diag_dtc.c
ar cr libdiag.a diag_l0_se.o diag_l0_me.o diag_l0_vw.o
diag_l0_br.o diag_l1.o diag_l2.o diag_l2_raw.o
diag_l2_iso9141.o diag_l2_iso14230.o diag_l2_saej1850.o
diag_l2_vag.o diag_l2_mb1.o diag_l3.o
diag_l3_saej1979.o diag_l3_iso14230.o diag_l3_vag.o
diag_os.o diag_general.o diag_dtc.o
cc -DLINUX -I. -c -o scantool.o scantool.c
scantool.c: In function `j1979_data_rcv':
scantool.c:231: pointers are not permitted as case values
scantool.c:232: pointers are not permitted as case values
scantool.c:321: pointers are not permitted as case values
scantool.c:325: pointers are not permitted as case values
scantool.c:326: pointers are not permitted as case values
scantool.c:410: pointers are not permitted as case values
scantool.c: In function `l3_do_j1979_rqst':
scantool.c:635: pointers are not permitted as case values
scantool.c:636: pointers are not permitted as case values
make: *** [scantool.o] Error 1

this is using gcc version 3.2.1 20020830 (Debian
prerelease) on a debian box.

Discussion

  • Logged In: YES
    user_id=287450

    Hi
    I just downloaded the current CVS tree, did "touch
    diag_l0_elm.c", and then compiled , which was completely
    clean.

    Some of the source/headers are in dos format (not unix
    format), and this has been confusing some compilers - I
    suspect you are seeing this.

    I have therefore converted scantool.h to unix format (in vi, do
    set fileformat=unix and save)

    Can you tell me if that fixes things for you ?

    Regards, Richard

     
  • steven roemen
    steven roemen
    2002-09-11

    Logged In: YES
    user_id=378450

    i still get those errors after i grab the new cvs code...

    i'm using gcc-3.2.1 from debian if that makes any difference.

     
  • Logged In: YES
    user_id=287450

    Im using Gcc 2.96 on Redhat.

    This is definetly a compiler "incompatability", as I am using
    pointers in the case values.

    I will need to do some work to stop using these pointers ..
    which I will do, but since my compiler doesnt complain I
    guess I'll rely on your kindness to test it for me !

     
  • Logged In: YES
    user_id=287450

    Ive updated the CVS tree and changed all that code and put
    the casts in properly (rather than the lazy way I had done)

    Let me know if that works ! Thanks

     
  • steven roemen
    steven roemen
    2002-09-11

    Logged In: YES
    user_id=378450

    that compiles!

    thanks a bunch.

    when my br-2 tool gets here next week i'll really do some
    testing!

     
  • Logged In: YES
    user_id=287450

    Ok, I'll close this.

    (ps, dont forget theres a .scantoolrc file to put in the "set
    interface ..." command in)

     
    • status: open --> closed