Ector software gradient: Fix cast from integer to pointer of wrong type.
authorTom Hacohen <tom@stosb.com>
Tue, 22 Sep 2015 14:45:04 +0000 (15:45 +0100)
committerTom Hacohen <tom@stosb.com>
Tue, 22 Sep 2015 14:45:11 +0000 (15:45 +0100)
When casting pointer<->int, always use uintptr_t, not just int.

@fix

src/lib/ector/software/ector_software_gradient.c

index d6ad207..707c345 100644 (file)
@@ -107,7 +107,7 @@ static void
 loop_break(unsigned int *buffer, int length, int *lprealign, int *lby4 , int *lremaining)
 {
    int l1=0,l2=0,l3=0;
-   while ((int)buffer & 0xF)
+   while ((uintptr_t)buffer & 0xF)
      buffer++ , l1++;
 
    if(length <= l1)