Skip to content

Commit 19f003b

Browse files
committed
fix incorrect type for QDLDL_bool
1 parent 4cb6ee1 commit 19f003b

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

linsys/cpu/direct/private.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static scs_int ldl_prepare(ScsLinSysWork *p) {
5151
L->i = (scs_int *)scs_calloc(nzmax, sizeof(scs_int));
5252
p->Dinv = (scs_float *)scs_calloc(n, sizeof(scs_float));
5353
p->D = (scs_float *)scs_calloc(n, sizeof(scs_float));
54-
p->bwork = (scs_int *)scs_calloc(n, sizeof(scs_int));
54+
p->bwork = (QDLDL_bool *)scs_calloc(n, sizeof(QDLDL_bool));
5555
p->fwork = (scs_float *)scs_calloc(n, sizeof(scs_float));
5656
return nzmax;
5757
}

linsys/cpu/direct/private.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ struct SCS_LIN_SYS_WORK {
2222
scs_int factorizations;
2323
/* ldl factorization workspace */
2424
scs_float *D, *fwork;
25-
scs_int *etree, *iwork, *Lnz, *bwork;
25+
scs_int *etree, *iwork, *Lnz;
26+
QDLDL_bool *bwork;
2627
scs_float *diag_p;
2728
};
2829

linsys/external/qdldl/qdldl_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" {
1212

1313
#define QDLDL_int scs_int
1414
#define QDLDL_float scs_float
15-
#define QDLDL_bool scs_int
15+
#define QDLDL_bool unsigned char
1616

1717
/* Maximum value of the signed type QDLDL_int */
1818
#ifdef DLONG

scs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ CUDSS_LDFLAGS = $(CULDFLAGS) -L$(CUDSS_PATH)/lib -lcudss
6464
# Add on default CFLAGS
6565
OPT = -O3
6666
INCLUDE = -I. -Iinclude -Ilinsys
67-
override CFLAGS += -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes $(INCLUDE) $(OPT)
67+
override CFLAGS += -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes $(INCLUDE) $(OPT) -Werror=incompatible-pointer-types
6868
ifneq ($(ISWINDOWS), 1)
6969
override CFLAGS += -fPIC
7070
endif

0 commit comments

Comments
 (0)