Skip to content

Commit b3fd477

Browse files
committed
try making analyzer happy
1 parent a6b4cef commit b3fd477

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ DEBUGFLAGS_GCC += $(FLAGS) $(ADDL_DEBUGFLAGS)
226226
SHIPFLAGS_CLANG += $(FLAGS) $(ADDL_SHIPFLAGS)
227227
DEBUGFLAGS_CLANG += $(FLAGS) $(ADDL_DEBUGFLAGS)
228228

229+
DEBUGFLAGS_CLANG += -Wno-nullability-extension -Wno-nullability-completeness # required to be allowed to use nullability extension and not be required to annotate all of everything
230+
ifeq ($(USEGCC),1) # TODO: we currently set flags incorrectly for clang analyze, but mostly it works out okay
231+
DEBUGFLAGS_CLANG += -Wno-unknown-warning-option
232+
endif
233+
DEBUGFLAGS_CLANG += -Wno-return-type-c-linkage # TODO: do we care about fixing this instead? (it is not a bug, just a nuisance)
234+
229235
ifeq ($(USE_CROSS_FLISP), 1)
230236
FLISPDIR := $(BUILDDIR)/flisp/host
231237
FLISP_EXECUTABLE_debug := $(FLISPDIR)/flisp-debug$(BUILD_EXE)

src/julia.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,17 +498,17 @@ typedef struct _jl_abi_override_t {
498498

499499
typedef struct {
500500
JL_DATA_TYPE
501-
jl_sym_t *name;
502-
jl_value_t *lb; // lower bound
503-
jl_value_t *ub; // upper bound
501+
jl_sym_t *JL_NONNULL name;
502+
jl_value_t *JL_NONNULL lb; // lower bound
503+
jl_value_t *JL_NONNULL ub; // upper bound
504504
} jl_tvar_t;
505505

506506
// UnionAll type (iterated union over all values of a variable in certain bounds)
507507
// written `body where lb<:var<:ub`
508508
typedef struct {
509509
JL_DATA_TYPE
510-
jl_tvar_t *var;
511-
jl_value_t *body;
510+
jl_tvar_t *JL_NONNULL var;
511+
jl_value_t *JL_NONNULL body;
512512
} jl_unionall_t;
513513

514514
// represents the "name" part of a DataType, describing the syntactic structure
@@ -543,8 +543,8 @@ typedef struct {
543543

544544
typedef struct {
545545
JL_DATA_TYPE
546-
jl_value_t *a;
547-
jl_value_t *b;
546+
jl_value_t *JL_NONNULL a;
547+
jl_value_t *JL_NONNULL b;
548548
} jl_uniontype_t;
549549

550550
// in little-endian, isptr is always the first bit, avoiding the need for a branch in computing isptr

0 commit comments

Comments
 (0)