* libtiff/tif_close.c, libtiff/tif_extension.c : rename link
variable to avoid -Wshadow warnings
This commit is contained in:
parent
142a8a8d4e
commit
e4df80bf75
@ -1,6 +1,7 @@
|
|||||||
2015-12-06 Even Rouault <even.rouault at spatialys.com>
|
2015-12-06 Even Rouault <even.rouault at spatialys.com>
|
||||||
|
|
||||||
* libtiff/tif_close.c: rename variable to avoid -Wshadow warning
|
* libtiff/tif_close.c, libtiff/tif_extension.c : rename link
|
||||||
|
variable to avoid -Wshadow warnings
|
||||||
|
|
||||||
2015-11-22 Even Rouault <even.rouault at spatialys.com>
|
2015-11-22 Even Rouault <even.rouault at spatialys.com>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_extension.c,v 1.7 2010-03-10 18:56:48 bfriesen Exp $ */
|
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_extension.c,v 1.8 2015-12-06 11:13:43 erouault Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988-1997 Sam Leffler
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -66,13 +66,13 @@ TIFFTagMethods *TIFFAccessTagMethods( TIFF *tif )
|
|||||||
void *TIFFGetClientInfo( TIFF *tif, const char *name )
|
void *TIFFGetClientInfo( TIFF *tif, const char *name )
|
||||||
|
|
||||||
{
|
{
|
||||||
TIFFClientInfoLink *link = tif->tif_clientinfo;
|
TIFFClientInfoLink *psLink = tif->tif_clientinfo;
|
||||||
|
|
||||||
while( link != NULL && strcmp(link->name,name) != 0 )
|
while( psLink != NULL && strcmp(psLink->name,name) != 0 )
|
||||||
link = link->next;
|
psLink = psLink->next;
|
||||||
|
|
||||||
if( link != NULL )
|
if( psLink != NULL )
|
||||||
return link->data;
|
return psLink->data;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -80,18 +80,18 @@ void *TIFFGetClientInfo( TIFF *tif, const char *name )
|
|||||||
void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )
|
void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )
|
||||||
|
|
||||||
{
|
{
|
||||||
TIFFClientInfoLink *link = tif->tif_clientinfo;
|
TIFFClientInfoLink *psLink = tif->tif_clientinfo;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Do we have an existing link with this name? If so, just
|
** Do we have an existing link with this name? If so, just
|
||||||
** set it.
|
** set it.
|
||||||
*/
|
*/
|
||||||
while( link != NULL && strcmp(link->name,name) != 0 )
|
while( psLink != NULL && strcmp(psLink->name,name) != 0 )
|
||||||
link = link->next;
|
psLink = psLink->next;
|
||||||
|
|
||||||
if( link != NULL )
|
if( psLink != NULL )
|
||||||
{
|
{
|
||||||
link->data = data;
|
psLink->data = data;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,15 +99,15 @@ void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )
|
|||||||
** Create a new link.
|
** Create a new link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
link = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
|
psLink = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
|
||||||
assert (link != NULL);
|
assert (psLink != NULL);
|
||||||
link->next = tif->tif_clientinfo;
|
psLink->next = tif->tif_clientinfo;
|
||||||
link->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1));
|
psLink->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1));
|
||||||
assert (link->name != NULL);
|
assert (psLink->name != NULL);
|
||||||
strcpy(link->name, name);
|
strcpy(psLink->name, name);
|
||||||
link->data = data;
|
psLink->data = data;
|
||||||
|
|
||||||
tif->tif_clientinfo = link;
|
tif->tif_clientinfo = psLink;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
|
Loading…
Reference in New Issue
Block a user