From 732abf5b48dd922a7760bf85ce65d72207c7272d Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 16 Aug 2024 21:35:10 -0700 Subject: [PATCH] Compiler warnings. --- .gitignore | 1 + src/map/if/acd/ac_decomposition.hpp | 4 ++-- src/opt/fxu/fxuReduce.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cbb424152..cdf34f18d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ lib/m114* lib/bip* docs/ .vscode/ +.cache/ src/ext* src/xxx/ diff --git a/src/map/if/acd/ac_decomposition.hpp b/src/map/if/acd/ac_decomposition.hpp index 7628ab39e..c6a526e08 100644 --- a/src/map/if/acd/ac_decomposition.hpp +++ b/src/map/if/acd/ac_decomposition.hpp @@ -510,7 +510,7 @@ private: } } while ( combinations_offset_next( free_set_size, offset, pComb, pInvPerm, tt ) ); - std::array res_perm; + std::array res_perm = {0}; if ( best_cost > ( 1 << ( ps.lut_size - free_set_size ) ) ) { @@ -543,7 +543,7 @@ private: } /* enumerate combinations */ - std::array res_perm; + std::array res_perm = {0}; do { diff --git a/src/opt/fxu/fxuReduce.c b/src/opt/fxu/fxuReduce.c index 84e2bf87a..6e5dd0fed 100644 --- a/src/opt/fxu/fxuReduce.c +++ b/src/opt/fxu/fxuReduce.c @@ -84,6 +84,8 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota nBitsMax = nFanins; } assert( iPair == nPairsTotal ); + if ( nBitsMax == -1 ) + nBitsMax = 0; // allocate storage for counters of cube pairs by difference pnPairCounters = ABC_CALLOC( int, 2 * nBitsMax );