summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-03-29 08:29:56 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-03-29 08:29:56 +0200
commit617279a571bab705910a45d4aee2984d64743016 (patch)
tree2e9b85c6f7b248163759588fe5ddfde92389efb8 /ACE
parent825ea09f911b53887a1eb8f05b1f2da35e5c4347 (diff)
downloadATCD-617279a571bab705910a45d4aee2984d64743016.tar.gz
Generate some fallthroughs to silence gcc warnings
* ACE/apps/gperf/src/Key_List.cpp:
Diffstat (limited to 'ACE')
-rw-r--r--ACE/apps/gperf/src/Key_List.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/ACE/apps/gperf/src/Key_List.cpp b/ACE/apps/gperf/src/Key_List.cpp
index f3602013f78..8deb3ee4024 100644
--- a/ACE/apps/gperf/src/Key_List.cpp
+++ b/ACE/apps/gperf/src/Key_List.cpp
@@ -601,7 +601,7 @@ Key_List::output_switch (int use_keyword_table)
}
if (!option[OPTIMIZE])
ACE_OS::printf (" if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)\n {\n");
- ACE_OS::printf (" unsigned int key = %s (str, len);\n\n", option.hash_name ());
+ ACE_OS::printf (" unsigned int const key = %s (str, len);\n\n", option.hash_name ());
if (!option[OPTIMIZE])
ACE_OS::printf (" if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)\n");
@@ -664,7 +664,7 @@ Key_List::output_switch (int use_keyword_table)
}
else
{
- List_Node *links;
+ List_Node *links = 0;
for (links = temp; links; links = links->link)
{
@@ -1254,8 +1254,8 @@ Key_List::output_hash_function (void)
ACE_OS::printf (" case %d:\n", count);
ACE_OS::printf (option[STRCASECMP]
- ? " case %d:\n hval += asso_values[static_cast<int>(charmap[static_cast<int>(str[%d])])];\n"
- : " case %d:\n hval += asso_values[static_cast<int>(str[%d])];\n",
+ ? " case %d:\n hval += asso_values[static_cast<int>(charmap[static_cast<int>(str[%d])])];\n // Fallthrough\n"
+ : " case %d:\n hval += asso_values[static_cast<int>(str[%d])];\n // Fallthrough \n",
key_pos, key_pos - 1);
}
while ((key_pos = option.get ()) != EOS && key_pos != WORD_END);
@@ -1494,7 +1494,7 @@ Key_List::output_lookup_function (void)
{
if (!option[OPTIMIZE])
ACE_OS::printf (" if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)\n {\n");
- ACE_OS::printf (" unsigned int key = %s (str, len);\n\n", option.hash_name ());
+ ACE_OS::printf (" unsigned int const key = %s (str, len);\n\n", option.hash_name ());
if (!option[OPTIMIZE])
ACE_OS::printf (" if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)\n");
ACE_OS::printf (" {\n");