#include <string.h>
#include <stdint.h>

/**
 * Efficient string hash function.
 */
static uint32_t string_hash(const char *str)
{
	uint32_t hash = 0;
	int32_t c;
	while ((c = *str++))
	{
		hash = c + (hash << 6) + (hash << 16) - hash;
	}
	return hash;
}

/**
 * Test two strings for equality.
 */
static int string_compare(const char *str1, const char *str2)
{
	if (str1 == str2)
	{
		return 1;
	}
	if (str2 == NULL) 
	{
		return 0;
	}
	return strcmp(str1, str2) == 0;
}

#include <string.h>
#include <stdint.h>

/**
 * Efficient string hash function.
 */
__attribute__((unused))
static uint32_t string_hash(const char *str)
{
	uint32_t hash = 0;
	int32_t c;
	while ((c = *str++))
	{
		hash = c + (hash << 6) + (hash << 16) - hash;
	}
	return hash;
}

/**
 * Test two strings for equality.
 */
__attribute__((unused))
static int string_compare(const char *str1, const char *str2)
{
	if (str1 == str2)
	{
		return 1;
	}
	if (str2 == NULL) 
	{
		return 0;
	}
	return strcmp(str1, str2) == 0;
}

Mark string functions unused, in case the header is included in files that only use one of them.
Mark string functions unused, in case the header is included in files that only use one of them.



git-svn-id: f6517e426f81db5247881cd92f7386583ace04fa@30387 72102866-910b-0410-8b05-ffd578937521
