diff --git a/libguile/arrays.c b/libguile/arrays.c index 89f5e9d09..6724d0071 100644 --- a/libguile/arrays.c +++ b/libguile/arrays.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006, 2009, 2010, 2011 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -860,7 +860,6 @@ SCM scm_i_read_array (SCM port, int c) { ssize_t rank; - int got_rank; char tag[80]; int tag_len; @@ -888,7 +887,6 @@ scm_i_read_array (SCM port, int c) return SCM_BOOL_F; } rank = 1; - got_rank = 1; tag[0] = 'f'; tag_len = 1; goto continue_reading_tag; diff --git a/libguile/backtrace.c b/libguile/backtrace.c index 7140228c2..db22c17e9 100644 --- a/libguile/backtrace.c +++ b/libguile/backtrace.c @@ -429,7 +429,7 @@ display_backtrace_body (struct display_backtrace_args *a) #define FUNC_NAME "display_backtrace_body" { int n_frames, beg, end, n, i, j; - int nfield, indent_p, indentation; + int nfield, indentation; SCM frame, sport, print_state; SCM last_file; scm_print_state *pstate; @@ -482,9 +482,6 @@ display_backtrace_body (struct display_backtrace_args *a) pstate->fancyp = 1; pstate->highlight_objects = a->highlight_objects; - /* First find out if it's reasonable to do indentation. */ - indent_p = 0; - /* Determine size of frame number field. */ j = end; for (i = 0; j > 0; ++i) j /= 10; diff --git a/libguile/filesys.c b/libguile/filesys.c index 68d90d926..96752bcd7 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2009, 2010, 2011 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -845,7 +845,6 @@ SCM_DEFINE (scm_readdir, "readdir", 1, 0, 0, { struct dirent_or_dirent64 de; /* just for sizeof */ DIR *ds = (DIR *) SCM_SMOB_DATA_1 (port); - size_t namlen; #ifdef NAME_MAX char buf [SCM_MAX (sizeof (de), sizeof (de) - sizeof (de.d_name) + NAME_MAX + 1)]; @@ -865,8 +864,6 @@ SCM_DEFINE (scm_readdir, "readdir", 1, 0, 0, if (! rdent) return SCM_EOF_VAL; - namlen = NAMLEN (rdent); - return (rdent ? scm_from_locale_stringn (rdent->d_name, NAMLEN (rdent)) : SCM_EOF_VAL); } diff --git a/libguile/i18n.c b/libguile/i18n.c index c51df4a2c..da3c220de 100644 --- a/libguile/i18n.c +++ b/libguile/i18n.c @@ -1113,23 +1113,19 @@ chr_to_case (SCM chr, scm_t_locale c_locale, #define FUNC_NAME func_name { int ret; - scm_t_wchar *buf; + scm_t_uint32 c; scm_t_uint32 *convbuf; size_t convlen; - SCM str, convchar; + SCM convchar; - str = scm_i_make_wide_string (1, &buf); - buf[0] = SCM_CHAR (chr); + c = SCM_CHAR (chr); if (c_locale != NULL) RUN_IN_LOCALE_SECTION (c_locale, ret = - u32_locale_tocase ((scm_t_uint32 *) buf, 1, - &convbuf, - &convlen, func)); + u32_locale_tocase (&c, 1, &convbuf, &convlen, func)); else ret = - u32_locale_tocase ((scm_t_uint32 *) buf, 1, &convbuf, - &convlen, func); + u32_locale_tocase (&c, 1, &convbuf, &convlen, func); if (SCM_UNLIKELY (ret != 0)) { diff --git a/libguile/numbers.c b/libguile/numbers.c index f8891fa87..427e77263 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -146,7 +146,7 @@ static double atanh (double x) { return 0.5 * log ((1 + x) / (1 - x)); } #if defined (GUILE_I) -#if HAVE_COMPLEX_DOUBLE +#if defined HAVE_COMPLEX_DOUBLE /* For an SCM object Z which is a complex number (ie. satisfies SCM_COMPLEXP), return its value as a C level "complex double". */ @@ -9449,7 +9449,8 @@ SCM_PRIMITIVE_GENERIC (scm_log, "log", 1, 0, 0, { if (SCM_COMPLEXP (z)) { -#if HAVE_COMPLEX_DOUBLE && HAVE_CLOG && defined (SCM_COMPLEX_VALUE) +#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_CLOG \ + && defined (SCM_COMPLEX_VALUE) return scm_from_complex_double (clog (SCM_COMPLEX_VALUE (z))); #else double re = SCM_COMPLEX_REAL (z); @@ -9534,7 +9535,8 @@ SCM_PRIMITIVE_GENERIC (scm_exp, "exp", 1, 0, 0, { if (SCM_COMPLEXP (z)) { -#if HAVE_COMPLEX_DOUBLE && HAVE_CEXP && defined (SCM_COMPLEX_VALUE) +#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_CEXP \ + && defined (SCM_COMPLEX_VALUE) return scm_from_complex_double (cexp (SCM_COMPLEX_VALUE (z))); #else return scm_c_make_polar (exp (SCM_COMPLEX_REAL (z)), diff --git a/libguile/ports.c b/libguile/ports.c index a48cc8607..8f52e66f1 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -522,12 +522,9 @@ static void finalize_port (GC_PTR, GC_PTR); static SCM_C_INLINE_KEYWORD void register_finalizer_for_port (SCM port) { - long port_type; GC_finalization_proc prev_finalizer; GC_PTR prev_finalization_data; - port_type = SCM_TC2PTOBNUM (SCM_CELL_TYPE (port)); - /* Register a finalizer for PORT so that its iconv CDs get freed and optionally its type's `free' function gets called. */ GC_REGISTER_FINALIZER_NO_ORDER (SCM2PTR (port), finalize_port, 0, diff --git a/libguile/posix.c b/libguile/posix.c index 97e30df2b..a5c72624c 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1713,12 +1713,10 @@ SCM_DEFINE (scm_nice, "nice", 1, 0, 0, "The return value is unspecified.") #define FUNC_NAME s_scm_nice { - int nice_value; - /* nice() returns "prio-NZERO" on success or -1 on error, but -1 can arise from "prio-NZERO", so an error must be detected from errno changed */ errno = 0; - nice_value = nice (scm_to_int (incr)); + nice (scm_to_int (incr)); if (errno != 0) SCM_SYSERROR; diff --git a/libguile/stacks.c b/libguile/stacks.c index 267b3c404..31bd91b13 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -247,7 +247,6 @@ SCM_DEFINE (scm_make_stack, "make-stack", 1, 0, 1, #define FUNC_NAME s_scm_make_stack { long n; - int maxp; SCM frame; SCM stack; SCM inner_cut, outer_cut; @@ -289,7 +288,6 @@ SCM_DEFINE (scm_make_stack, "make-stack", 1, 0, 1, /* Count number of frames. Also get stack id tag and check whether there are more stackframes than we want to record (SCM_BACKTRACE_MAXDEPTH). */ - maxp = 0; n = stack_depth (frame); /* Make the stack object. */