[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shadowing warning from test-printf-posix.h
From: |
Bruno Haible |
Subject: |
Re: shadowing warning from test-printf-posix.h |
Date: |
Thu, 3 Apr 2008 00:28:57 +0200 |
User-agent: |
KMail/1.5.4 |
Jim Meyering wrote:
> * tests/test-frexpl.c (exp): #define to 'exponent' to avoid
> shadowing the function.
> * tests/test-frexp.c: Likewise.
It has the drawback of making debugging with gdb a little harder. Oh well.
Applied anyway (see below).
------------------------------------------------------------------------
Note to Karl: While applying this patch, I got this:
$ git push
To ssh://address@hidden/srv/git/gnulib
! [rejected] master -> master (non-fast forward)
error: failed to push to 'ssh://address@hidden/srv/git/gnulib'
This means that someone did commits at the same time as I. This resolved it:
$ git stash # save my private changes
$ git pull # get the public commits
$ gitk # shows a lozange
$ git rebase origin/master
$ gitk # shows a linear list of commits again.
$ git stash apply # restore my private changes
$ git push
Note also that the git-merge-changelog program had the effect of avoiding
ChangeLog conflicts during "git pull" and during "git rebase origin/master".
------------------------------------------------------------------------
2008-04-02 Jim Meyering <address@hidden>
Avoid some warnings from "gcc -Wshadow".
* tests/test-frexp.c (exp): Define to a different identifier.
* tests/test-frexpl.c (exp): Likewise.
*** tests/test-frexp.c.orig 2008-04-03 00:13:33.000000000 +0200
--- tests/test-frexp.c 2008-04-03 00:12:28.000000000 +0200
***************
*** 27,32 ****
--- 27,36 ----
#include "isnand.h"
#include "nan.h"
+ /* Avoid some warnings from "gcc -Wshadow".
+ This file doesn't use the exp() function. */
+ #define exp exponent
+
#define ASSERT(expr) \
do \
{ \
*** tests/test-frexpl.c.orig 2008-04-03 00:13:33.000000000 +0200
--- tests/test-frexpl.c 2008-04-03 00:12:27.000000000 +0200
***************
*** 1,5 ****
/* Test of splitting a 'long double' into fraction and mantissa.
! Copyright (C) 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- 1,5 ----
/* Test of splitting a 'long double' into fraction and mantissa.
! Copyright (C) 2007-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
***************
*** 27,32 ****
--- 27,36 ----
#include "fpucw.h"
#include "isnanl-nolibm.h"
+ /* Avoid some warnings from "gcc -Wshadow".
+ This file doesn't use the exp() function. */
+ #define exp exponent
+
#define ASSERT(expr) \
do \
{ \