[svn-commits] seanbright: editline/trunk r150 - in /editline/trunk: examples/ src/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 16 10:14:26 CDT 2010


Author: seanbright
Date: Tue Mar 16 10:14:22 2010
New Revision: 150

URL: http://svnview.digium.com/svn/thirdparty?view=rev&rev=150
Log:
Resolve some build warnings that show up when we crank up the compiler warnings to 11.

Modified:
    editline/trunk/examples/fileman.c
    editline/trunk/src/fgetln.c
    editline/trunk/src/refresh.c
    editline/trunk/src/strlcat.c
    editline/trunk/src/strlcpy.c
    editline/trunk/src/unvis.c
    editline/trunk/src/vis.c

Modified: editline/trunk/examples/fileman.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/examples/fileman.c?view=diff&rev=150&r1=149&r2=150
==============================================================================
--- editline/trunk/examples/fileman.c (original)
+++ editline/trunk/examples/fileman.c Tue Mar 16 10:14:22 2010
@@ -16,6 +16,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <time.h>
 
 /* GNU readline
 #include <readline/readline.h>
@@ -25,7 +26,7 @@
 
 void * xmalloc (size_t size);
 void too_dangerous (char *caller);
-void initialize_readline ();
+void initialize_readline (void);
 int execute_line (char *line);
 int valid_argument (char *caller, char *arg);
 
@@ -69,8 +70,9 @@
 };
 
 /* Forward declarations. */
-char *stripwhite ();
-COMMAND *find_command ();
+char *stripwhite (char *);
+COMMAND *find_command (char *);
+char *dupstr (char *);
 
 /* The name of this program, as taken from argv[0]. */
 char *progname;
@@ -221,7 +223,7 @@
    complete on command names if this is the first word in the line, or
    on filenames if not. */
 void
-initialize_readline ()
+initialize_readline (void)
 {
    /* Allow conditional parsing of the ~/.inputrc file. */
    rl_readline_name = "FileMan";
@@ -275,7 +277,7 @@
 
    /* Return the next name which partially matches from the
       command list. */
-   while (name = commands[list_index].name)
+   while ((name = commands[list_index].name))
    {
       list_index++;
 

Modified: editline/trunk/src/fgetln.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/src/fgetln.c?view=diff&rev=150&r1=149&r2=150
==============================================================================
--- editline/trunk/src/fgetln.c (original)
+++ editline/trunk/src/fgetln.c Tue Mar 16 10:14:22 2010
@@ -33,7 +33,7 @@
 #include "nbtool_config.h"
 #endif
 
-#if !HAVE_FGETLN
+#ifndef HAVE_FGETLN
 #include <config.h>
 #include <stdlib.h>
 #ifndef HAVE_NBTOOL_CONFIG_H

Modified: editline/trunk/src/refresh.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/src/refresh.c?view=diff&rev=150&r1=149&r2=150
==============================================================================
--- editline/trunk/src/refresh.c (original)
+++ editline/trunk/src/refresh.c Tue Mar 16 10:14:22 2010
@@ -229,7 +229,7 @@
 	prompt_print(el, EL_PROMPT);
 
 	/* draw the current input buffer */
-#if notyet
+#ifdef notyet
 	termsz = el->el_term.t_size.h * el->el_term.t_size.v;
 	if (el->el_line.lastchar - el->el_line.buffer > termsz) {
 		/*

Modified: editline/trunk/src/strlcat.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/src/strlcat.c?view=diff&rev=150&r1=149&r2=150
==============================================================================
--- editline/trunk/src/strlcat.c (original)
+++ editline/trunk/src/strlcat.c Tue Mar 16 10:14:22 2010
@@ -33,7 +33,7 @@
 # endif
 #endif
 
-#if !HAVE_STRLCAT
+#ifndef HAVE_STRLCAT
 /*
  * Appends src to string dst of size siz (unlike strncat, siz is the
  * full size of dst, not space left).  At most siz-1 characters

Modified: editline/trunk/src/strlcpy.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/src/strlcpy.c?view=diff&rev=150&r1=149&r2=150
==============================================================================
--- editline/trunk/src/strlcpy.c (original)
+++ editline/trunk/src/strlcpy.c Tue Mar 16 10:14:22 2010
@@ -33,7 +33,7 @@
 # endif
 #endif
 
-#if !HAVE_STRLCPY
+#ifndef HAVE_STRLCPY
 /*
  * Copy src to string dst of size siz.  At most siz-1 characters
  * will be copied.  Always NUL terminates (unless siz == 0).

Modified: editline/trunk/src/unvis.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/src/unvis.c?view=diff&rev=150&r1=149&r2=150
==============================================================================
--- editline/trunk/src/unvis.c (original)
+++ editline/trunk/src/unvis.c Tue Mar 16 10:14:22 2010
@@ -49,7 +49,7 @@
 __weak_alias(strunvis,_strunvis)
 #endif
 
-#if !HAVE_VIS
+#ifndef HAVE_VIS
 /*
  * decode driven by state machine
  */

Modified: editline/trunk/src/vis.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/src/vis.c?view=diff&rev=150&r1=149&r2=150
==============================================================================
--- editline/trunk/src/vis.c (original)
+++ editline/trunk/src/vis.c Tue Mar 16 10:14:22 2010
@@ -74,7 +74,7 @@
 __weak_alias(vis,_vis)
 #endif
 
-#if !HAVE_VIS || !HAVE_SVIS
+#if !defined(HAVE_VIS) || !defined(HAVE_SVIS)
 #include <ctype.h>
 #include <limits.h>
 #include <stdio.h>
@@ -343,7 +343,7 @@
 }
 #endif
 
-#if !HAVE_VIS
+#ifndef HAVE_VIS
 /*
  * vis - visually encode characters
  */




More information about the svn-commits mailing list