Author: biurrun Date: Thu Nov 5 12:56:47 2009 New Revision: 1533 Log: Rename function parameter to fix -Wshadow warning: libpisa/log.c: In function `convert_time_t_to_formatted_string': libpisa/log.c:305: error: declaration of `time' shadows a global declaration /usr/include/time.h:187: error: shadowed declaration is here Modified: trunk/libpisa/log.c Modified: trunk/libpisa/log.c ============================================================================== --- trunk/libpisa/log.c Thu Nov 5 12:49:01 2009 (r1532) +++ trunk/libpisa/log.c Thu Nov 5 12:56:47 2009 (r1533) @@ -295,23 +295,26 @@ /** * Formats the given time with the given time format - * @param time A Pointer to the time which should be formatted + * @param time_to_format A Pointer to the time which should be formatted * @param buffer A pointer to the buffer where the string should be stored * @param buffer_size The size of the buffer * @param time_format The time_format which should be used to format the given time * @param gm 1->Use gmtime, 0->Use localtime * @return 0->error; 1->success */ -static int convert_time_t_to_formatted_string(time_t *time, char *buffer, int buffer_size, const char *time_format, int gm) +static int convert_time_t_to_formatted_string(time_t *time_to_format, + char *buffer, + int buffer_size, + const char *time_format, int gm) { struct tm *ts; // Convert to given date format // Use local or gmtime if (!gm) - ts = localtime(time); + ts = localtime(time_to_format); else - ts = gmtime(time); + ts = gmtime(time_to_format); return (strftime(buffer, buffer_size, time_format, ts) != 0); }