Browse Source

Fixed some compiler errors/warnings for clang.

tags/v0.2.15^2
Hank Anderson 11 years ago
parent
commit
84d90d6ed8
4 changed files with 10 additions and 6 deletions
  1. +1
    -1
      common.h
  2. +2
    -2
      cpuid_x86.c
  3. +2
    -2
      driver/others/memory.c
  4. +5
    -1
      kernel/arm/zdot.c

+ 1
- 1
common.h View File

@@ -310,7 +310,7 @@ typedef int blasint;
#endif

#if defined(OS_WINDOWS)
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
#define YIELDING YieldProcessor()
#else
#define YIELDING SwitchToThread()


+ 2
- 2
cpuid_x86.c View File

@@ -40,7 +40,7 @@
#include <string.h>
#include "cpuid.h"

#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
#define C_INLINE __inline
#else
#define C_INLINE inline
@@ -154,7 +154,7 @@ static C_INLINE int have_excpuid(void){
#ifndef NO_AVX
static C_INLINE void xgetbv(int op, int * eax, int * edx){
//Use binary code for xgetbv
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
*eax = __xgetbv(op);
#else
__asm__ __volatile__


+ 2
- 2
driver/others/memory.c View File

@@ -769,12 +769,12 @@ static void *alloc_hugetlb(void *address){
if (LookupPrivilegeValue(NULL, SE_LOCK_MEMORY_NAME, &tp.Privileges[0].Luid) != TRUE) {
CloseHandle(hToken);
return -1;
return (void*)-1;
}

if (AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) != TRUE) {
CloseHandle(hToken);
return -1;
return (void*)-1;
}

map_address = (void *)VirtualAlloc(address,


+ 5
- 1
kernel/arm/zdot.c View File

@@ -35,9 +35,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**************************************************************************************/

#include "common.h"
#include <complex.h>

#ifndef _MSC_VER
#include <complex.h>
FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
#else
openblas_complex_double CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y)
#endif
{
BLASLONG i=0;
BLASLONG ix=0,iy=0;


Loading…
Cancel
Save