This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error 18 on most functions that are properly formatted??

So, I am new to Keil. I am porting a project in and building to find errors.

I get multiple error 18's insisting a ")" is expected on a simple line that is perfectly legitimate c syntax. Such as this function:

uint8_t si_rd_user()
{ uint8_t value; twi_write(SI_ADDR, SI_READ_USER_REGISTER); value = twi_read(SI_ADDR); return(value);
}

The twi_write line is errored, but it certainly does not need any further parens
Oddly, the line is not x'd as an error.

What is going on here. Can anyone help with this?

Thanks
Robin@TL

Parents
  • Please see the instructions for posting source code.

    www.danlhenry.com/.../keil_code.png


    "on a simple line that is perfectly legitimate c syntax"

    That usually means the actual error occurred somewhere before that line, which puts the compiler out-of-sync - the error is reported at the point at which it can no longer make any sense of the text.

    So please also post a few lines of context before the point at which the error is reported, and identify the exact position of the report.

    Also please post the full and unabridged text of the error.

    Use copy & paste - do not manually re-type.

Reply
  • Please see the instructions for posting source code.

    www.danlhenry.com/.../keil_code.png


    "on a simple line that is perfectly legitimate c syntax"

    That usually means the actual error occurred somewhere before that line, which puts the compiler out-of-sync - the error is reported at the point at which it can no longer make any sense of the text.

    So please also post a few lines of context before the point at which the error is reported, and identify the exact position of the report.

    Also please post the full and unabridged text of the error.

    Use copy & paste - do not manually re-type.

Children