1) Odds are, you can probably just ignore the warning if it's still giving you the correct output (even though the types differ, C will perform an implicit type conversion to convert it into an unsigned integer).
2) If you would like to get rid of the warning, you can always explicitly type cast the variable into a unsigned integer, like so:
printf("test2: %08x\n", (unsigned int)test2);
3) If you're going to be passing data into Altera functions (either drivers or the HAL), it's probably best to keep using the alt_* types, although if you don't mind occasionally doing an explicit conversion, you can use the usual types.