makezero icon indicating copy to clipboard operation
makezero copied to clipboard

looks like does not follow branching

Open dkropachev opened this issue 7 months ago • 0 comments

	var cols []ColumnInfo
	if meta.colCount < 1000 {
		// preallocate columninfo to avoid excess copying
		cols = make([]ColumnInfo, meta.colCount)
		for i := 0; i < meta.colCount; i++ {
			f.readCol(&cols[i], &meta, globalSpec, keyspace, table)
		}
	} else {
		// use append, huge number of columns usually indicates a corrupt frame or
		// just a huge row.
		for i := 0; i < meta.colCount; i++ {
			var col ColumnInfo
			f.readCol(&col, &meta, globalSpec, keyspace, table)
			cols = append(cols, col)
		}
	}

throws:

frame.go:1119:11: append to slice `cols` with non-zero initialized length (makezero)
                        cols = append(cols, col)

dkropachev avatar May 31 '25 13:05 dkropachev