mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
Reduce warning with clang compiler.
This commit is contained in:
parent
91dae272cd
commit
f0ae1b2d63
2 changed files with 14 additions and 6 deletions
10
src/c/dpp.c
10
src/c/dpp.c
|
|
@ -668,7 +668,15 @@ put_declaration(void)
|
|||
|
||||
put_lineno();
|
||||
the_env_defined = 1;
|
||||
fprintf(out, "\tconst cl_env_ptr the_env = ecl_process_env();\n");
|
||||
fprintf(out,
|
||||
"#ifdef __clang__\n"
|
||||
"#pragma clang diagnostic push\n"
|
||||
"#pragma clang diagnostic ignored \"-Wunused-variable\"\n"
|
||||
"#endif\n"
|
||||
"\tconst cl_env_ptr the_env = ecl_process_env();\n"
|
||||
"#ifdef __clang__\n"
|
||||
"#pragma clang diagnostic pop\n"
|
||||
"#endif\n" );
|
||||
for (i = 0; i < nopt; i++) {
|
||||
put_lineno();
|
||||
fprintf(out, "\tcl_object %s;\n", optional[i].o_var);
|
||||
|
|
|
|||
10
src/c/file.d
10
src/c/file.d
|
|
@ -1099,10 +1099,8 @@ utf_8_decoder(cl_object stream)
|
|||
static int
|
||||
utf_8_encoder(cl_object stream, unsigned char *buffer, ecl_character c)
|
||||
{
|
||||
int nbytes;
|
||||
if (c < 0) {
|
||||
nbytes = 0;
|
||||
} else if (c <= 0x7F) {
|
||||
int nbytes = 0;
|
||||
if (c <= 0x7F) {
|
||||
buffer[0] = c;
|
||||
nbytes = 1;
|
||||
} else if (c <= 0x7ff) {
|
||||
|
|
@ -2784,10 +2782,12 @@ io_file_get_position(cl_object strm)
|
|||
offset = lseek(f, 0, SEEK_CUR);
|
||||
ecl_enable_interrupts();
|
||||
unlikely_if (offset < 0)
|
||||
{
|
||||
if (errno == ESPIPE)
|
||||
return(ECL_NIL);
|
||||
else
|
||||
io_error(strm);
|
||||
}
|
||||
if (sizeof(ecl_off_t) == sizeof(long)) {
|
||||
output = ecl_make_integer(offset);
|
||||
} else {
|
||||
|
|
@ -5126,7 +5126,7 @@ ecl_open_stream(cl_object fn, enum ecl_smmode smm, cl_object if_exists,
|
|||
FEerror("Illegal stream mode ~S", 1, ecl_make_fixnum(smm));
|
||||
}
|
||||
if (flags & ECL_STREAM_C_STREAM) {
|
||||
FILE *fp;
|
||||
FILE *fp = 0;
|
||||
safe_close(f);
|
||||
/* We do not use fdopen() because Windows seems to
|
||||
* have problems with the resulting streams. Furthermore, even for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue