lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev two warnings


From: Bela Lubkin
Subject: lynx-dev two warnings
Date: Mon, 5 Oct 1998 14:44:06 -0700

Lynx 2.8.1pre.8 builds on SCO OpenServer Release 5.0.5 with exactly two
warnings, no errors.  The warnings are:

        cc -belf -O3 -Kspace -DHAVE_CONFIG_H   -I.  -I..  -Ichrtrans  
-I./chrtrans  -I..  -I../src  -I../WWW/Library/Implementation   -belf  -c 
./LYShowInfo.c
"./LYShowInfo.c", line 29: warning: no macro replacement within a string literal
        cc -belf -O3 -Kspace -DHAVE_CONFIG_H   -I.  -I..  -Ichrtrans  
-I./chrtrans  -I..  -I../src  -I../WWW/Library/Implementation   -belf  -c 
./LYOptions.c
"./LYOptions.c", line 3213: warning: no macro replacement within a string 
literal

These are caused by the compiler zealously looking for the names of
macro arguments within quoted strings, e.g.:

  #define foo(n) printf("Value: %d\n", n);
                                   ^
  It sees this "n" as a potential attempt to quote the macro argument,
  as supported by older compilers, but deprecated by ANSI C.

Here are patches which correct these, making the build 100% clean.

>Bela<

=============================================================================

*** LYOptions.c.orig    Sat Sep 26 20:28:34 1998
--- LYOptions.c Mon Oct  5 14:37:31 1998
***************
*** 3210,3219 ****
  #define PutLabel(fp, text) \
        fprintf(fp,"  %-33s: ", text)
  
! #define PutTextInput(fp, name, value, size, disable) \
        fprintf(fp,\
        "<input size=%d type=\"text\" name=\"%s\" value=\"%s\" %s>\n",\
!               (int) size, name, value, disable)
  
  #define PutOption(fp, flag, html, name) \
        fprintf(fp,"<option value=\"%s\" %s>%s\n", html, SELECTED(flag), name)
--- 3210,3219 ----
  #define PutLabel(fp, text) \
        fprintf(fp,"  %-33s: ", text)
  
! #define PutTextInput(fp, Name, Value, Size, disable) \
        fprintf(fp,\
        "<input size=%d type=\"text\" name=\"%s\" value=\"%s\" %s>\n",\
!               (int) Size, Name, Value, disable)
  
  #define PutOption(fp, flag, html, name) \
        fprintf(fp,"<option value=\"%s\" %s>%s\n", html, SELECTED(flag), name)
*** LYShowInfo.c.orig   Sat Sep 26 20:28:34 1998
--- LYShowInfo.c        Mon Oct  5 14:36:52 1998
***************
*** 26,32 ****
  #ifdef HAVE_CONFIG_H
  #define HAVE_CFG_DEFS_H
  
! #define PutDefs(table, n) fprintf(fp0, "%-35s %s\n", table[n].name, 
table[n].value)
  
  /*
   *  Compile-time definitions info, returns local url
--- 26,32 ----
  #ifdef HAVE_CONFIG_H
  #define HAVE_CFG_DEFS_H
  
! #define PutDefs(table, N) fprintf(fp0, "%-35s %s\n", table[N].name, 
table[N].value)
  
  /*
   *  Compile-time definitions info, returns local url

reply via email to

[Prev in Thread] Current Thread [Next in Thread]