[syslinux] [GIT-PULL] Elflink fixes

Paulo Alcantara pcacjr at zytor.com
Thu Jul 5 00:19:06 PDT 2012


The first two patches basically fix two warnings, and the last one avoid
compiling the whole core in Syslinux with debug enabled by default that
was accidently added in commit 72842b6 I presume.

Hi Matt,

Please consider pulling too.


		Paulo

The following changes since commit 1f822f83b3d757c9a72f1eb99ebd723ee61e625b:

  Fix Makefile install targets (2012-07-04 11:21:19 +0100)

are available in the git repository at:

  git://git.zytor.com/users/pcacjr/syslinux.git elflink-fixes-for-hpa

for you to fetch changes up to 5441637e53c663764612a708ad75b00d3229c1a5:

  core: Makefile: Do not enable debug by default (2012-07-05 03:55:37 -0300)

Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>

----------------------------------------------------------------
Paulo Alcantara (3):
      elf_module: Remove unused variable
      vdprintf: Remove unused variable
      core: Makefile: Do not enable debug by default

 com32/lib/sys/module/elf_module.c |    4 +---
 com32/lib/vdprintf.c              |    5 ++---
 core/Makefile                     |    2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/com32/lib/sys/module/elf_module.c b/com32/lib/sys/module/elf_module.c
index d8009aa..dbb5afe 100644
--- a/com32/lib/sys/module/elf_module.c
+++ b/com32/lib/sys/module/elf_module.c
@@ -509,15 +509,13 @@ int module_load(struct elf_module *module) {
 		 * reverse order.
 		 */
 		for (i = module->nr_needed - 1; i >= 0; i--) {
-			size_t len, j;
 			char *dep, *p;
 			char *argv[2] = { NULL, NULL };
 
 			dep = module->str_table + module->needed[i];
 
 			/* strip everything but the last component */
-			j = len = strlen(dep);
-			if (!len)
+			if (!strlen(dep))
 				continue;
 
 			if (strchr(dep, '/')) {
diff --git a/com32/lib/vdprintf.c b/com32/lib/vdprintf.c
index 77e8da4..db60295 100644
--- a/com32/lib/vdprintf.c
+++ b/com32/lib/vdprintf.c
@@ -45,14 +45,13 @@ static void debug_putc(char c)
 
 void vdprintf(const char *format, va_list ap)
 {
-    int rv, _rv;
+    int rv;
     char buffer[BUFFER_SIZE];
     char *p;
     static bool debug_init = false;
     static bool debug_ok   = false;
 
-    _rv = rv = vsnprintf(buffer, BUFFER_SIZE, format, ap);
-
+    rv = vsnprintf(buffer, BUFFER_SIZE, format, ap);
     if (rv < 0)
 	return;
 
diff --git a/core/Makefile b/core/Makefile
index 3147566..a01d83a 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -62,7 +62,7 @@ NASMOPT  += $(NASMDEBUG)
 
 PREPCORE = ../lzo/prepcore
 
-CFLAGS	+= -DDEBUG=1 -D__SYSLINUX_CORE__
+CFLAGS += -D__SYSLINUX_CORE__
 
 # The DATE is set on the make command line when building binaries for
 # official release.  Otherwise, substitute a hex string that is pretty much



More information about the Syslinux mailing list