File tree Expand file tree Collapse file tree 6 files changed +84
-0
lines changed Expand file tree Collapse file tree 6 files changed +84
-0
lines changed Original file line number Diff line number Diff line change @@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733 while ((page = pagetable_iterate (tbm -> pagetable , & i )) != NULL )
734734 {
735735 if (page -> ischunk )
736+ {
737+ /*
738+ * NOTE: This is different from the original tidbitmap.c.
739+ * This check is necessary to avoid warnings from scan-build.
740+ */
741+ Assert (tbm -> schunks );
736742 tbm -> schunks [nchunks ++ ] = page ;
743+ }
737744 else
745+ {
746+ /*
747+ * NOTE: This is different from the original tidbitmap.c.
748+ * This check is necessary to avoid warnings from scan-build.
749+ */
750+ Assert (tbm -> spages );
738751 tbm -> spages [npages ++ ] = page ;
752+ }
739753 }
740754 Assert (npages == tbm -> npages );
741755 Assert (nchunks == tbm -> nchunks );
Original file line number Diff line number Diff line change @@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733 while ((page = pagetable_iterate (tbm -> pagetable , & i )) != NULL )
734734 {
735735 if (page -> ischunk )
736+ {
737+ /*
738+ * NOTE: This is different from the original tidbitmap.c.
739+ * This check is necessary to avoid warnings from scan-build.
740+ */
741+ Assert (tbm -> schunks );
736742 tbm -> schunks [nchunks ++ ] = page ;
743+ }
737744 else
745+ {
746+ /*
747+ * NOTE: This is different from the original tidbitmap.c.
748+ * This check is necessary to avoid warnings from scan-build.
749+ */
750+ Assert (tbm -> spages );
738751 tbm -> spages [npages ++ ] = page ;
752+ }
739753 }
740754 Assert (npages == tbm -> npages );
741755 Assert (nchunks == tbm -> nchunks );
Original file line number Diff line number Diff line change @@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733 while ((page = pagetable_iterate (tbm -> pagetable , & i )) != NULL )
734734 {
735735 if (page -> ischunk )
736+ {
737+ /*
738+ * NOTE: This is different from the original tidbitmap.c.
739+ * This check is necessary to avoid warnings from scan-build.
740+ */
741+ Assert (tbm -> schunks );
736742 tbm -> schunks [nchunks ++ ] = page ;
743+ }
737744 else
745+ {
746+ /*
747+ * NOTE: This is different from the original tidbitmap.c.
748+ * This check is necessary to avoid warnings from scan-build.
749+ */
750+ Assert (tbm -> spages );
738751 tbm -> spages [npages ++ ] = page ;
752+ }
739753 }
740754 Assert (npages == tbm -> npages );
741755 Assert (nchunks == tbm -> nchunks );
Original file line number Diff line number Diff line change @@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733 while ((page = pagetable_iterate (tbm -> pagetable , & i )) != NULL )
734734 {
735735 if (page -> ischunk )
736+ {
737+ /*
738+ * NOTE: This is different from the original tidbitmap.c.
739+ * This check is necessary to avoid warnings from scan-build.
740+ */
741+ Assert (tbm -> schunks );
736742 tbm -> schunks [nchunks ++ ] = page ;
743+ }
737744 else
745+ {
746+ /*
747+ * NOTE: This is different from the original tidbitmap.c.
748+ * This check is necessary to avoid warnings from scan-build.
749+ */
750+ Assert (tbm -> spages );
738751 tbm -> spages [npages ++ ] = page ;
752+ }
739753 }
740754 Assert (npages == tbm -> npages );
741755 Assert (nchunks == tbm -> nchunks );
Original file line number Diff line number Diff line change @@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733 while ((page = pagetable_iterate (tbm -> pagetable , & i )) != NULL )
734734 {
735735 if (page -> ischunk )
736+ {
737+ /*
738+ * NOTE: This is different from the original tidbitmap.c.
739+ * This check is necessary to avoid warnings from scan-build.
740+ */
741+ Assert (tbm -> schunks );
736742 tbm -> schunks [nchunks ++ ] = page ;
743+ }
737744 else
745+ {
746+ /*
747+ * NOTE: This is different from the original tidbitmap.c.
748+ * This check is necessary to avoid warnings from scan-build.
749+ */
750+ Assert (tbm -> spages );
738751 tbm -> spages [npages ++ ] = page ;
752+ }
739753 }
740754 Assert (npages == tbm -> npages );
741755 Assert (nchunks == tbm -> nchunks );
Original file line number Diff line number Diff line change @@ -734,9 +734,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
734734 while ((page = pagetable_iterate (tbm -> pagetable , & i )) != NULL )
735735 {
736736 if (page -> ischunk )
737+ {
738+ /*
739+ * NOTE: This is different from the original tidbitmap.c.
740+ * This check is necessary to avoid warnings from scan-build.
741+ */
742+ Assert (tbm -> schunks );
737743 tbm -> schunks [nchunks ++ ] = page ;
744+ }
738745 else
746+ {
747+ /*
748+ * NOTE: This is different from the original tidbitmap.c.
749+ * This check is necessary to avoid warnings from scan-build.
750+ */
751+ Assert (tbm -> spages );
739752 tbm -> spages [npages ++ ] = page ;
753+ }
740754 }
741755 Assert (npages == tbm -> npages );
742756 Assert (nchunks == tbm -> nchunks );
You can’t perform that action at this time.
0 commit comments