#51 missing cast in line 114 of 'device/lib/ds390.c'

closed-accepted
None
5
2005-12-07
2005-12-06
Hubert Sack
No

Because a cast is missing, SDCC promotes unnecessarily
to int.
Line 114 should be 'if (SDA_IN != (unsigned char)
bout)' instead of 'if (SDA_IN != bout)'

Discussion

  • Maarten Brock

    Maarten Brock - 2005-12-06

    Logged In: YES
    user_id=888171

    I assume that should be 'device/lib/ds390/i2c390.c'.
    Why not change the prototype to:

    char BitOutI2C(unsigned char bout)

     
  • Hubert Sack

    Hubert Sack - 2005-12-07

    Logged In: YES
    user_id=1160854

    Hi Maarten,

    you're right.
    I did'nt take a detailed look to the source; I saw the
    warning by running "make" with the lasted snapshot and my
    extensions/changes (RFE 1156868, 1156978, 1162453; PATCH
    1181753, 1367130) and simply added the typecast.
    I did this, because I always expect that source is NOT
    written quick and dirty

     
  • Maarten Brock

    Maarten Brock - 2005-12-07
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-accepted
     
  • Maarten Brock

    Maarten Brock - 2005-12-07

    Logged In: YES
    user_id=888171

    Changed in SDCC 2.5.4 #1182

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks