Home AMX User Forum NetLinx Studio
Options

Help with Compiler Error (Sinteger to Sinteger)

Greetings!

I am updating a program originally created by another programmer. When I get existing code to modify, I always compile it to make certain everything is good before I touch it.

This project generates an warning I didn't think would be possible:

WARNING: <file path> (1986) : C10571: Converting type [SINTEGER] to [SINTEGER}

Not only does the warning make no sense (passing a signed value between two signed integers isn't "converting" anything), but I cannot even find where the warning is being generated. There are 1985 lines of code, so the compiler is generating the warning when it reaches the end of the file.

Sifting through the declarations & the usages of the signed integers, I cannot find a problem. Why is the compiler complaining about this? It isn't a critical error, but I have never seen this before, and I don't like warnings in any code I generate.

Anyone have any ideas? (Sorry if this has been covered, but I did search the forums for this topic and found nothing related).

Comments

  • Options
    Like you already mention in your post, it's not an error, it's a warning. It could be nothing to be worried about. Type cast warnings can happen while doing no harm, that's up to the programmer to judge. When doing somewhat complicated math, these type cast warnings are not that unusual; I get them on a regular basis. If you know why they happen and decide there's no harm done, you can supress the warning with the TYPE_CAST command. The casting will still happen, just the warning will go away.
    The somewhat strange warning [SINTEGER to SINTEGER], could be because the compiler only shows you the input and the output of the calculation, not the intermediate steps. So in reality it could be [SINTEGER to INTEGER] followed by [INTEGER to SINTEGER] in the same calculation. Not sure, though.
    Could be that the original programmer never got the error, because later compiler versions use stricter rules.
    If it bugs you, you could comment out blocks of code until you find the warning. That can be time consuming, though.
  • Options
    HyyrHyyr Posts: 9
    Thanks for responding!

    I'm letting the program roll out of here, as I don't have time to mess with a warning that doesn't stop the compiler. But as it still bugs me, I'll go through the code later on & see if I can find it. As you mentioned, it is most likely an Sinteger-Integer-Sinteger calculation or such. I just thought it was really odd. I'll post it here if I find it.
Sign In or Register to comment.