diff --git a/src/db/db/dbCIFReader.cc b/src/db/db/dbCIFReader.cc index ac4ba4940..30ddf3781 100644 --- a/src/db/db/dbCIFReader.cc +++ b/src/db/db/dbCIFReader.cc @@ -449,6 +449,9 @@ CIFReader::read_cell (db::Layout &layout, db::Cell &cell, double sf, int level) if (! test_semi ()) { denom = read_integer (); divider = read_integer (); + if (divider == 0) { + error ("'DS' command: divider cannot be zero"); + } } expect_semi (); @@ -476,7 +479,7 @@ CIFReader::read_cell (db::Layout &layout, db::Cell &cell, double sf, int level) // DF command: // "D" blank* "F" if (level == 0) { - error ("'DS' command must be inside a cell specification"); + error ("'DF' command must be inside a cell specification"); } // skip the rest of the command @@ -490,7 +493,7 @@ CIFReader::read_cell (db::Layout &layout, db::Cell &cell, double sf, int level) // "D" blank* "D" integer read_integer (); - warn ("DD command ignored"); + warn ("'DD' command ignored"); skip_to_end (); } else { diff --git a/src/db/db/dbOASISWriter.cc b/src/db/db/dbOASISWriter.cc index c7620e051..ba2e2546e 100644 --- a/src/db/db/dbOASISWriter.cc +++ b/src/db/db/dbOASISWriter.cc @@ -665,6 +665,9 @@ OASISWriter::OASISWriter () mp_cell (0), m_layer (0), m_datatype (0), m_in_cblock (false), + m_propname_id (0), + m_propstring_id (0), + m_proptables_written (false), m_progress (tl::to_string (QObject::tr ("Writing OASIS file")), 10000) { m_progress.set_format (tl::to_string (QObject::tr ("%.0f MB"))); diff --git a/src/db/db/dbRecursiveShapeIterator.cc b/src/db/db/dbRecursiveShapeIterator.cc index 7281b9861..c9797f858 100644 --- a/src/db/db/dbRecursiveShapeIterator.cc +++ b/src/db/db/dbRecursiveShapeIterator.cc @@ -104,6 +104,8 @@ RecursiveShapeIterator::RecursiveShapeIterator () mp_shape_prop_sel = 0; m_shape_inv_prop_sel = false; m_needs_reinit = false; + m_inst_quad_id = 0; + m_shape_quad_id = 0; } RecursiveShapeIterator::RecursiveShapeIterator (const shapes_type &shapes) diff --git a/src/db/db/gsiDeclDbLayoutDiff.cc b/src/db/db/gsiDeclDbLayoutDiff.cc index 00f8e4cdd..10f3a58f0 100644 --- a/src/db/db/gsiDeclDbLayoutDiff.cc +++ b/src/db/db/gsiDeclDbLayoutDiff.cc @@ -36,7 +36,8 @@ class LayoutDiff { public: LayoutDiff () - : mp_layout_a (0), mp_layout_b (0) + : mp_layout_a (0), mp_cell_a (0), m_layer_index_a (0), + mp_layout_b (0), mp_cell_b (0), m_layer_index_b (0) { // .. nothing yet .. } diff --git a/src/db/unit_tests/dbObject.cc b/src/db/unit_tests/dbObject.cc index a8d03d968..e341554d8 100644 --- a/src/db/unit_tests/dbObject.cc +++ b/src/db/unit_tests/dbObject.cc @@ -49,13 +49,13 @@ struct A : public db::Object x += d; } - void undo (db::Op *op) throw () + void undo (db::Op *op) { AO *aop = dynamic_cast (op); x -= aop->d; } - void redo (db::Op *op) throw () + void redo (db::Op *op) { AO *aop = dynamic_cast (op); tl_assert (aop != 0); @@ -154,13 +154,13 @@ struct B : public db::Object } } - void undo (db::Op *op) throw () + void undo (db::Op *op) { BO *bop = dynamic_cast (op); x -= bop->d; } - void redo (db::Op *op) throw () + void redo (db::Op *op) { BO *bop = dynamic_cast (op); tl_assert (bop != 0); diff --git a/src/lay/lay/laySearchReplaceDialog.cc b/src/lay/lay/laySearchReplaceDialog.cc index de1880ffa..89104ddc0 100644 --- a/src/lay/lay/laySearchReplaceDialog.cc +++ b/src/lay/lay/laySearchReplaceDialog.cc @@ -703,7 +703,8 @@ SearchReplaceDialog::SearchReplaceDialog (lay::PluginRoot *root, lay::LayoutView m_current_mode (0), m_window (FitMarker), m_window_dim (0.0), - m_max_item_count (0) + m_max_item_count (0), + m_last_query_cv_index (0) { setObjectName (QString::fromUtf8 ("search_replace_dialog")); diff --git a/src/laybasic/laybasic/layRedrawThreadWorker.cc b/src/laybasic/laybasic/layRedrawThreadWorker.cc index d7a6fdd7d..7d67986e4 100644 --- a/src/laybasic/laybasic/layRedrawThreadWorker.cc +++ b/src/laybasic/laybasic/layRedrawThreadWorker.cc @@ -1143,7 +1143,7 @@ static bool skip_quad (const db::Box &qb, const lay::Bitmap *vertex_bitmap, const db::CplxTrans &trans) { double threshold = 32 / trans.mag (); // don't check cells below 32x32 pixels - if (qb.empty () || qb.width () > threshold || qb.height () > threshold) { + if (qb.empty () || qb.width () > threshold || qb.height () > threshold || !vertex_bitmap) { return false; } diff --git a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc b/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc index 8e87d8e1c..4d7e6d1e4 100644 --- a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc +++ b/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc @@ -321,7 +321,7 @@ SaveLayoutOptionsDialog::get_options_internal () // SaveLayoutAsOptionsDialog implementation SaveLayoutAsOptionsDialog::SaveLayoutAsOptionsDialog (QWidget *parent, const std::string &title) - : QDialog (parent), Ui::SaveLayoutAsOptionsDialog () + : QDialog (parent), Ui::SaveLayoutAsOptionsDialog (), mp_tech (0) { setObjectName (QString::fromUtf8 ("save_layout_options_dialog")); diff --git a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc b/src/laybasic/laybasic/rdbMarkerBrowserPage.cc index 61c2a30e4..c43b5d060 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc +++ b/src/laybasic/laybasic/rdbMarkerBrowserPage.cc @@ -401,7 +401,7 @@ public: bool cat_matches (const QModelIndex &index, const QString &filter) const { MarkerBrowserTreeViewModelCacheEntry *node = (MarkerBrowserTreeViewModelCacheEntry *)(index.internalPointer ()); - if (node) { + if (node && mp_database) { rdb::id_type id = node->id (); const rdb::Category *category = mp_database->category_by_id (id); @@ -418,7 +418,7 @@ public: bool cell_matches (const QModelIndex &index, const QString &filter) const { MarkerBrowserTreeViewModelCacheEntry *node = (MarkerBrowserTreeViewModelCacheEntry *)(index.internalPointer ()); - if (node) { + if (node && mp_database) { rdb::id_type id = node->id (); const rdb::Cell *cell = mp_database->cell_by_id (id); @@ -435,7 +435,7 @@ public: bool no_errors (const QModelIndex &index) const { MarkerBrowserTreeViewModelCacheEntry *node = (MarkerBrowserTreeViewModelCacheEntry *)(index.internalPointer ()); - if (node) { + if (node && mp_database) { rdb::id_type id = node->id (); bool none = false; @@ -638,6 +638,10 @@ public: QModelIndex next_index (QModelIndex current_index, bool up) { + if (!mp_database) { + return QModelIndex (); + } + MarkerBrowserTreeViewModelCacheEntry *node = (MarkerBrowserTreeViewModelCacheEntry *) current_index.internalPointer (); rdb::id_type id = node->id (); diff --git a/src/tl/unit_tests/tlThreadedWorkers.cc b/src/tl/unit_tests/tlThreadedWorkers.cc index 877e81fa3..1dd1684cb 100644 --- a/src/tl/unit_tests/tlThreadedWorkers.cc +++ b/src/tl/unit_tests/tlThreadedWorkers.cc @@ -41,7 +41,7 @@ inline void usleep(long us) class Sum { public: - Sum () : m_sum(0) { } + Sum () : m_sum(0), m_flag (false) { } void reset () { lock.lock (); m_sum = 0; lock.unlock (); m_flag = false; } void add(int n) { lock.lock (); m_sum += n; lock.unlock (); m_flag = true; }