The integer a does hold a 2. When you assign a floating point value to a integer there is a implicit conversion that happens. And the conversion for a floating point number to a integer is that it just truncates off everything after the decimal.
I can't comment on whatever warnings you are getting without knowing how it is being used and what compiler you are using though.
EDIT: Sorry just reread your post and not sure if you are asking why it doesn't give you warnings that it is doing a implicit conversion from 2.5 to 2 or if it is giving you warning.
Either way I would recommend reading up on implicit conversion since it is basically a must know in programming. You should know what will happen when a conversion between 2 types take place and when the compiler will implicitly do things for you (When you want it to and when you don't want it to).
No I dont get warnings I said maybe is right for compiler to put ones because we dont do some type casting here,or whatever
I am used to this notion but I am looking for deep infos/causes that makes this conversion
also I know this is a conversion but I did not not that it is implicit converstion
so what's an implicit conversion and is there an explicit conversion too