]> granicus.if.org Git - nethack/commitdiff
static analyzer vs symbols.c
authorPatR <rankin@nethack.org>
Wed, 18 Jan 2023 19:29:40 +0000 (11:29 -0800)
committerPatR <rankin@nethack.org>
Wed, 18 Jan 2023 19:29:40 +0000 (11:29 -0800)
This will probably shut up the static analyzer's exceedingly verbose
complaint for symbols.c.

src/symbols.c

index e35b41703b00939ae58ef0c3a55b3a95b9d490b4..dde3f9e01defa775ba0f4d3cb13951c3d31776b8 100644 (file)
@@ -1126,6 +1126,7 @@ shuffle_customizations(void)
 
         for (i = 0; i < NUM_OBJECTS; i++) {
             duplicate[i] = -1;
+            tmp_u[i] = (struct unicode_representation *) 0;
         }
         for (i = 0; i < NUM_OBJECTS; i++) {
             int idx = objects[i].oc_descr_idx;
@@ -1172,9 +1173,10 @@ find_matching_symset_customization(
     enum graphics_sets which_set)
 {
     struct symset_customization *gdc = &gs.sym_customizations[which_set];
+
     if ((gdc->custtype == custtype)
         && (strcmp(customization_name, gdc->customization_name) != 0))
-            return gdc->details;
+        return gdc->details;
     return (struct customization_detail *) 0;
 }