Many Warning as Internal Error?

Hi I got the Internal Error Like this. .
Internal compiler error. See the console log for more information. output was:Assets/Script/…

By opening that Console Log will be full of warning errors.

I used #pragma warning disable & restore to reduce that warning. Is that correct way to do that or it cause some problem in the final Build?

Here is my sample code:

	private void SortArrayByOrder ()
	{
#pragma warning disable
		List<int> OrderedArray = new List<int>();
		List<int> tempArray = new List<int>();
		tempArray = IndexArray;
		for(int i = 0; i < BowlersIndexArray.Count; i++)
		{
			......
                        ......
		}
		IndexArray = new List<int>();
		IndexArray = OrderedArray;
#pragma warning restore

If I remove the #pragma then, it shows error as

tempArray is assigned but never used.

Help to solve this?

You are better served by fixing the problems in the code, rather than hiding them. If tempArray is not used, then just delete or comment out that line.