i am having problem in type casting for lpc2129 please can any one give me an example of type casting which works,,,
Your code does not do anything so there is nothing to comment about.
If the function never makes use of jj, there is no need to perform any assign so no need to perform any type cast.
But a more important question - what is your reason for typecasting long to int? For some architectures they have the same numeric range. For some, long will be larger. So when code uses both int and long int, neither of the types should be used unless you as developer knows that both types are good enough for what they are used for.
If you do have code that needs to use specific data type sizes, and needs to convert between them, it's normally better to use int8_t, int16_t, int32_t and similar or maybe int_least8_t, ... or maybe int_fast8_t, ...
In the end, you do type casts for a reason. What is your reason? And what numeric range do you have on your data? And what did you expect should happen? And what did happen?