Browse Source

opencl/adl: Fix formatting to fit strict rules

Luke Dashjr 13 years ago
parent
commit
7a37f7ba9d
2 changed files with 4 additions and 4 deletions
  1. 1 1
      adl.c
  2. 3 3
      ocl.c

+ 1 - 1
adl.c

@@ -1053,7 +1053,7 @@ static bool fan_autotune(int gpu, int temp, int fanpercent, int lasttemp, bool *
 
 
 	get_fanrange(gpu, &iMin, &iMax);
 	get_fanrange(gpu, &iMin, &iMax);
 	if (temp > ga->overtemp && fanpercent < iMax) {
 	if (temp > ga->overtemp && fanpercent < iMax) {
-		applog(LOG_WARNING, "Overheat detected on GPU %d, increasing fan to 100%", gpu);
+		applog(LOG_WARNING, "Overheat detected on GPU %d, increasing fan to 100%%", gpu);
 		newpercent = iMax;
 		newpercent = iMax;
 
 
 		cgpu->device_last_not_well = time(NULL);
 		cgpu->device_last_not_well = time(NULL);

+ 3 - 3
ocl.c

@@ -546,7 +546,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
 		applog(LOG_ERR, "Error %d: Failed to clGetDeviceInfo when trying to get CL_DEVICE_MAX_MEM_ALLOC_SIZE", status);
 		applog(LOG_ERR, "Error %d: Failed to clGetDeviceInfo when trying to get CL_DEVICE_MAX_MEM_ALLOC_SIZE", status);
 		return NULL;
 		return NULL;
 	}
 	}
-	applog(LOG_DEBUG, "Max mem alloc size is %u", cgpu->max_alloc);
+	applog(LOG_DEBUG, "Max mem alloc size is %lu", (unsigned long)cgpu->max_alloc);
 
 
 	/* Create binary filename based on parameters passed to opencl
 	/* Create binary filename based on parameters passed to opencl
 	 * compiler to ensure we only load a binary that matches what would
 	 * compiler to ensure we only load a binary that matches what would
@@ -680,7 +680,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
 				ma <<= 1;
 				ma <<= 1;
 			if (ma < cgpu->max_alloc) {
 			if (ma < cgpu->max_alloc) {
 				cgpu->max_alloc = ma;
 				cgpu->max_alloc = ma;
-				applog(LOG_DEBUG, "Max alloc decreased to %lu", cgpu->max_alloc);
+				applog(LOG_DEBUG, "Max alloc decreased to %lu", (unsigned long)cgpu->max_alloc);
 			}
 			}
 		}
 		}
 	}
 	}
@@ -984,7 +984,7 @@ built:
 		/* Use the max alloc value which has been rounded to a power of
 		/* Use the max alloc value which has been rounded to a power of
 		 * 2 greater >= required amount earlier */
 		 * 2 greater >= required amount earlier */
 		if (bufsize > cgpu->max_alloc) {
 		if (bufsize > cgpu->max_alloc) {
-			applog(LOG_WARNING, "Maximum buffer memory device %d supports says %u", gpu, cgpu->max_alloc);
+			applog(LOG_WARNING, "Maximum buffer memory device %d supports says %lu", gpu, (unsigned long)cgpu->max_alloc);
 			applog(LOG_WARNING, "Your scrypt settings come to %u", bufsize);
 			applog(LOG_WARNING, "Your scrypt settings come to %u", bufsize);
 		} else
 		} else
 			bufsize = cgpu->max_alloc;
 			bufsize = cgpu->max_alloc;