]> www.infradead.org Git - mtd-utils.git/commitdiff
libiniparser: remove unused function needing float
authorAndrea Adami <andrea.adami@gmail.com>
Sat, 28 Jun 2014 22:44:57 +0000 (00:44 +0200)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Wed, 29 Mar 2017 11:40:33 +0000 (13:40 +0200)
Fixes:
|   LD      ubi-utils/ubiformat
| .../git/ubi-utils/libiniparser.a(libiniparser.o): In function
| `  LD      ubi-utils/ubirename
| iniparser_getdouble':
| .../git/ubi-utils/libiniparser.c:336: undefined reference to `atof'

Grep doesn't reveal any occurrence of iniparser_getdouble(), using atof() so
remove it: floating-point is not supported in klibc

Upstream-Status: Pending

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
include/libiniparser.h
lib/libiniparser.c

index be3c6675f5e4224f5ebc8f9499a4a2f7594e54d6..abd77aa4e24bc35f9468122f8a57c3abc2e78531 100644 (file)
@@ -156,21 +156,6 @@ char * iniparser_getstring(dictionary * d, const char * key, char * def);
 /*--------------------------------------------------------------------------*/
 int iniparser_getint(dictionary * d, const char * key, int notfound);
 
-/*-------------------------------------------------------------------------*/
-/**
-  @brief    Get the string associated to a key, convert to a double
-  @param    d Dictionary to search
-  @param    key Key string to look for
-  @param    notfound Value to return in case of error
-  @return   double
-
-  This function queries a dictionary for a key. A key as read from an
-  ini file is given as "section:key". If the key cannot be found,
-  the notfound value is returned.
- */
-/*--------------------------------------------------------------------------*/
-double iniparser_getdouble(dictionary * d, char * key, double notfound);
-
 /*-------------------------------------------------------------------------*/
 /**
   @brief    Get the string associated to a key, convert to a boolean
index 898f57ff42513634054b4ade40b87b442b283f02..ba70c089a651d8a5e802f50e3c4599cb24386317 100644 (file)
@@ -314,28 +314,6 @@ int iniparser_getint(dictionary * d, const char * key, int notfound)
     return (int)strtol(str, NULL, 0);
 }
 
-/*-------------------------------------------------------------------------*/
-/**
-  @brief    Get the string associated to a key, convert to a double
-  @param    d Dictionary to search
-  @param    key Key string to look for
-  @param    notfound Value to return in case of error
-  @return   double
-
-  This function queries a dictionary for a key. A key as read from an
-  ini file is given as "section:key". If the key cannot be found,
-  the notfound value is returned.
- */
-/*--------------------------------------------------------------------------*/
-double iniparser_getdouble(dictionary * d, char * key, double notfound)
-{
-    char    *   str ;
-
-    str = iniparser_getstring(d, key, INI_INVALID_KEY);
-    if (str==INI_INVALID_KEY) return notfound ;
-    return atof(str);
-}
-
 /*-------------------------------------------------------------------------*/
 /**
   @brief    Get the string associated to a key, convert to a boolean