1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Avoid g++ warnings.

This commit is contained in:
Bruno Haible
2009-12-22 11:57:02 +01:00
parent ce9b2f4eb4
commit b4eb8c5c5e
3 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
2009-12-22 Bruno Haible <bruno@clisp.org>
Avoid g++ warnings.
* src/options.cc (Options::print_options): Add parentheses.
* src/output.cc (Output::output_lookup_array): Cast fprintf argument.
2009-12-22 Bruno Haible <bruno@clisp.org>
Support CPPFLAGS as mandated by GNU standards.

View File

@@ -279,7 +279,7 @@ Options::print_options () const
{
putchar (*arg);
arg++;
if (*arg >= 'A' && *arg <= 'Z' || *arg >= 'a' && *arg <= 'z')
if ((*arg >= 'A' && *arg <= 'Z') || (*arg >= 'a' && *arg <= 'z'))
{
putchar (*arg);
arg++;
@@ -291,7 +291,7 @@ Options::print_options () const
putchar (*arg);
arg++;
}
while (*arg >= 'A' && *arg <= 'Z' || *arg >= 'a' && *arg <= 'z' || *arg == '-');
while ((*arg >= 'A' && *arg <= 'Z') || (*arg >= 'a' && *arg <= 'z') || *arg == '-');
if (*arg == '=')
{
putchar (*arg);

View File

@@ -1299,8 +1299,8 @@ Output::output_lookup_array () const
if (option[DEBUG])
fprintf (stderr,
"dup_ptr[%d]: hash_value = %d, index = %d, count = %d\n",
dup_ptr - duplicates,
"dup_ptr[%lu]: hash_value = %d, index = %d, count = %d\n",
static_cast<unsigned long>(dup_ptr - duplicates),
dup_ptr->hash_value, dup_ptr->index, dup_ptr->count);
int i;