summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-10-16 11:04:17 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2021-10-16 11:04:17 -0400
commit71cc1e78fd81818428cbd1b55fcf096979b529ef (patch)
tree1ac632b8c7b482ed771c520f5c3ad90277b49c78
parent15ee7400609b0b8837982a2dd388531bc19c06f6 (diff)
downloadrockbox-71cc1e78fd81818428cbd1b55fcf096979b529ef.tar.gz
rockbox-71cc1e78fd81818428cbd1b55fcf096979b529ef.zip
Open_plugins.c bugfix address of packed struct element
helpful gcc warning after g#3895 change to packed struct Change-Id: I89f765da94eeee14c606ea8ebaab5e219dceb2ac
-rw-r--r--apps/plugins/open_plugins.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/open_plugins.c b/apps/plugins/open_plugins.c
index d479bbd31c..b8d11d2ae5 100644
--- a/apps/plugins/open_plugins.c
+++ b/apps/plugins/open_plugins.c
@@ -296,6 +296,7 @@ static uint32_t op_entry_add_path(const char *key, const char *plugin, const cha
296{ 296{
297 int len; 297 int len;
298 uint32_t hash; 298 uint32_t hash;
299 uint32_t newhash;
299 char *pos = "";; 300 char *pos = "";;
300 int fd_tmp = -1; 301 int fd_tmp = -1;
301 use_key = (use_key == true && key != NULL); 302 use_key = (use_key == true && key != NULL);
@@ -309,7 +310,8 @@ static uint32_t op_entry_add_path(const char *key, const char *plugin, const cha
309 { 310 {
310 /* need to keep the old hash so we can remove the old entry */ 311 /* need to keep the old hash so we can remove the old entry */
311 hash = op_entry.hash; 312 hash = op_entry.hash;
312 open_plugin_get_hash(plugin, &op_entry.hash); 313 open_plugin_get_hash(plugin, &newhash);
314 op_entry.hash = newhash;
313 } 315 }
314 else 316 else
315 hash = op_entry.hash; 317 hash = op_entry.hash;
@@ -352,7 +354,10 @@ static uint32_t op_entry_add_path(const char *key, const char *plugin, const cha
352 /* hash on the parameter path if it is a file */ 354 /* hash on the parameter path if it is a file */
353 if (op_entry.lang_id <0 && key == op_entry.path && 355 if (op_entry.lang_id <0 && key == op_entry.path &&
354 rb->file_exists(op_entry.param)) 356 rb->file_exists(op_entry.param))
355 open_plugin_get_hash(op_entry.path, &op_entry.hash); 357 {
358 open_plugin_get_hash(op_entry.path, &newhash);
359 op_entry.hash = newhash;
360 }
356 } 361 }
357 362
358 rb->write(fd_tmp, &op_entry, op_entry_sz); /* add new entry first */ 363 rb->write(fd_tmp, &op_entry, op_entry_sz); /* add new entry first */