fix_warnings
This commit is contained in:
parent
50b13a15a0
commit
3d5303529f
@ -485,7 +485,7 @@ ENDIF()
|
||||
if (HAVE_GCC)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS -Wall)
|
||||
if (${C_COMPILER} MATCHES "GNU")
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS $<$<CONFIG:Release>:-O3;-fomit-frame-poinkter;-fstrict-aliasing;-freorder-blocks;-fsched-interblock>)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS $<$<CONFIG:Release>:-O3;-fomit-frame-pointer;-fstrict-aliasing;-freorder-blocks;-fsched-interblock>)
|
||||
else ()
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS $<$<CONFIG:Release>:-O3;-fstrict-aliasing;-freorder-blocks;-fsched-interblock>)
|
||||
endif ()
|
||||
@ -568,12 +568,12 @@ List(APPEND YLIBS $<TARGET_OBJECTS:utf8proc>)
|
||||
List(APPEND YLIBS $<TARGET_OBJECTS:myddas>)
|
||||
List(APPEND YLIBS $<TARGET_OBJECTS:libswi>)
|
||||
if (WIN32 OR ANDROID)
|
||||
List(APPEND YLIBS $<TARGET_OBJECTS:YAPsqlite3>)
|
||||
List(APPEND YLIBS $<TARGET_OBJECTS:YAP++>)
|
||||
if (WIN32 AND WITH_PYTHON)
|
||||
List(APPEND YLIBS $<TARGET_OBJECTS:Py4YAP>)
|
||||
endif ()
|
||||
if (ANDROID)
|
||||
List(APPEND YLIBS $<TARGET_OBJECTS:YAPsqlite3>)
|
||||
List(APPEND YLIBS $<TARGET_OBJECTS:YAPJava>)
|
||||
endif ()
|
||||
endif ()
|
||||
|
14
os/iopreds.c
14
os/iopreds.c
@ -1233,7 +1233,6 @@ static bool fill_stream(int sno, StreamDesc *st, Term tin, const char *io_mode,
|
||||
struct vfs *vfsp = NULL;
|
||||
const char *fname;
|
||||
|
||||
int i;
|
||||
if (IsAtomTerm(tin))
|
||||
fname = RepAtom(AtomOfTerm(tin))->StrOfAE;
|
||||
else if (IsStringTerm(tin))
|
||||
@ -1275,19 +1274,21 @@ static bool fill_stream(int sno, StreamDesc *st, Term tin, const char *io_mode,
|
||||
if (strchr(io_mode, 'r')) {
|
||||
return Yap_OpenBufWriteStream(PASS_REGS1);
|
||||
} else {
|
||||
i = push_text_stack();
|
||||
int j= push_text_stack();
|
||||
const char *buf;
|
||||
|
||||
buf = Yap_TextTermToText(tin PASS_REGS);
|
||||
if (!buf) {
|
||||
pop_text_stack(i);
|
||||
pop_text_stack(j);
|
||||
return false;
|
||||
}
|
||||
buf = pop_output_text_stack(i, buf);
|
||||
buf = pop_output_text_stack(j, buf);
|
||||
Atom nat = Yap_LookupAtom(Yap_StrPrefix(buf, 32));
|
||||
sno = Yap_open_buf_read_stream(buf, strlen(buf) + 1, &LOCAL_encoding,
|
||||
sno = Yap_open_buf_read_stream(buf, strlen(buf) + 1,
|
||||
&LOCAL_encoding,
|
||||
MEM_BUF_MALLOC, nat,
|
||||
MkAtomTerm(NameOfFunctor(f)));
|
||||
pop_text_stack(j);
|
||||
return Yap_OpenBufWriteStream(PASS_REGS1);
|
||||
}
|
||||
} else if (!strcmp(RepAtom(NameOfFunctor(f))->StrOfAE, "popen")) {
|
||||
@ -1307,8 +1308,7 @@ static bool fill_stream(int sno, StreamDesc *st, Term tin, const char *io_mode,
|
||||
st->status |= Popen_Stream_f;
|
||||
pop_text_stack(i);
|
||||
} else {
|
||||
pop_text_stack(i);
|
||||
Yap_ThrowError(DOMAIN_ERROR_SOURCE_SINK, tin, "open");
|
||||
Yap_ThrowError(DOMAIN_ERROR_SOURCE_SINK, tin, "open");
|
||||
}
|
||||
}
|
||||
if (!strchr(io_mode, 'b') && binary_file(fname)) {
|
||||
|
@ -34,7 +34,7 @@ add_definitions(-DSQLITE_ENABLE_FTS5=1 )
|
||||
SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1 )
|
||||
|
||||
|
||||
if (ANDROID OR WIN32)
|
||||
if (ANDROID )
|
||||
add_library( YAPsqlite3 OBJECT
|
||||
${YAPSQLITE3_SOURCES} )
|
||||
|
||||
|
Reference in New Issue
Block a user