unused vars and gcc warnings
This commit is contained in:
parent
885fc51225
commit
7a70280940
@ -93,6 +93,7 @@ static inline const char *enc_name(encoding_t enc)
|
|||||||
case ENC_UTF16_LE: return "utf16_le";
|
case ENC_UTF16_LE: return "utf16_le";
|
||||||
case ENC_ISO_UTF32_BE: return "utf32_be";
|
case ENC_ISO_UTF32_BE: return "utf32_be";
|
||||||
case ENC_ISO_UTF32_LE: return "utf32_le";
|
case ENC_ISO_UTF32_LE: return "utf32_le";
|
||||||
|
default: return "thanks for watching!!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,14 +156,14 @@ read_stream_to_terms(USES_REGS1)
|
|||||||
{
|
{
|
||||||
int sno = Yap_CheckStream (ARG1, Input_Stream_f, "read_line_to_codes/2");
|
int sno = Yap_CheckStream (ARG1, Input_Stream_f, "read_line_to_codes/2");
|
||||||
Term t, hd;
|
Term t, hd;
|
||||||
yhandle_t tails, outs, news;
|
yhandle_t tails, news;
|
||||||
|
|
||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
t = AbsPair(HR);
|
t = AbsPair(HR);
|
||||||
RESET_VARIABLE(HR);
|
RESET_VARIABLE(HR);
|
||||||
outs = Yap_InitSlot( (CELL)(HR) );
|
Yap_InitSlot( (CELL)(HR) );
|
||||||
tails = Yap_InitSlot( (CELL)(HR) );
|
tails = Yap_InitSlot( (CELL)(HR) );
|
||||||
news = Yap_InitSlot( (CELL)(HR) );
|
news = Yap_InitSlot( (CELL)(HR) );
|
||||||
HR++;
|
HR++;
|
||||||
|
@ -215,7 +215,7 @@ has_reposition(int sno,
|
|||||||
char *Yap_guessFileName(int f, int sno, char *nameb, size_t max) {
|
char *Yap_guessFileName(int f, int sno, char *nameb, size_t max) {
|
||||||
#if __linux__
|
#if __linux__
|
||||||
char path[256];
|
char path[256];
|
||||||
if (snprintf(path, 255, "/proc/self/fd/~d", f) && readlink(path, nameb, max))
|
if (snprintf(path, 255, "/proc/self/fd/%d", f) && readlink(path, nameb, max))
|
||||||
return nameb;
|
return nameb;
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
if (fcntl(f, F_GETPATH, nameb) != -1) {
|
if (fcntl(f, F_GETPATH, nameb) != -1) {
|
||||||
@ -720,7 +720,7 @@ static bool do_set_stream(int sno,
|
|||||||
GLOBAL_Stream[sno].status |= Eof_Error_Stream_f;
|
GLOBAL_Stream[sno].status |= Eof_Error_Stream_f;
|
||||||
GLOBAL_Stream[sno].status &= ~Reset_Eof_Stream_f;
|
GLOBAL_Stream[sno].status &= ~Reset_Eof_Stream_f;
|
||||||
} else if (t2 == TermReset) {
|
} else if (t2 == TermReset) {
|
||||||
GLOBAL_Stream[sno].status |= GLOBAL_Stream[sno].status &=
|
GLOBAL_Stream[sno].status &=
|
||||||
~Eof_Error_Stream_f;
|
~Eof_Error_Stream_f;
|
||||||
GLOBAL_Stream[sno].status |= Reset_Eof_Stream_f;
|
GLOBAL_Stream[sno].status |= Reset_Eof_Stream_f;
|
||||||
} else if (t2 == TermEOfCode) {
|
} else if (t2 == TermEOfCode) {
|
||||||
@ -754,8 +754,7 @@ static bool do_set_stream(int sno,
|
|||||||
GLOBAL_Stream[sno].status |= RepError_Xml_f;
|
GLOBAL_Stream[sno].status |= RepError_Xml_f;
|
||||||
GLOBAL_Stream[sno].status &= ~RepError_Prolog_f;
|
GLOBAL_Stream[sno].status &= ~RepError_Prolog_f;
|
||||||
} else if (t2 == TermError) {
|
} else if (t2 == TermError) {
|
||||||
GLOBAL_Stream[sno].status |= GLOBAL_Stream[sno].status &=
|
GLOBAL_Stream[sno].status &= ~RepError_Xml_f;
|
||||||
~RepError_Xml_f;
|
|
||||||
GLOBAL_Stream[sno].status |= RepError_Prolog_f;
|
GLOBAL_Stream[sno].status |= RepError_Prolog_f;
|
||||||
} else if (t2 == TermEOfCode) {
|
} else if (t2 == TermEOfCode) {
|
||||||
GLOBAL_Stream[sno].status &= ~RepError_Xml_f;
|
GLOBAL_Stream[sno].status &= ~RepError_Xml_f;
|
||||||
|
@ -103,6 +103,9 @@ static char SccsId[] = "%W% %G%";
|
|||||||
#if HAVE_LIBGEN_H
|
#if HAVE_LIBGEN_H
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if HAVE_STDARG_H
|
||||||
|
#include <stdarg.h>
|
||||||
|
#endif
|
||||||
#if HAVE_READLINE_READLINE_H
|
#if HAVE_READLINE_READLINE_H
|
||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user