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