Fixed conversion warnings with pq_sendint16 and pq_sendint32 [skip ci]

This commit is contained in:
Andrew Kane committed 2026-08-13 19:09:21 -07:00
1 parent 0cd6b58078
commit 29dbbe022d
3 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -410,8 +410,8 @@ halfvec_send(PG_FUNCTION_ARGS)
StringInfoData buf;
pq_begintypsend(&buf);
pq_sendint16(&buf, vec->dim);
pq_sendint16(&buf, vec->unused);
pq_sendint16(&buf, (uint16) vec->dim);
pq_sendint16(&buf, (uint16) vec->unused);
for (int i = 0; i < vec->dim; i++)
pq_sendhalf(&buf, vec->x[i]);
+4 -4
View File
@@ -569,13 +569,13 @@ sparsevec_send(PG_FUNCTION_ARGS)
StringInfoData buf;
pq_begintypsend(&buf);
pq_sendint32(&buf, svec->dim);
pq_sendint32(&buf, svec->nnz);
pq_sendint32(&buf, svec->unused);
pq_sendint32(&buf, (uint32) svec->dim);
pq_sendint32(&buf, (uint32) svec->nnz);
pq_sendint32(&buf, (uint32) svec->unused);
/* Binary representation uses zero-based numbering for indices */
for (int i = 0; i < svec->nnz; i++)
pq_sendint32(&buf, svec->indices[i]);
pq_sendint32(&buf, (uint32) svec->indices[i]);
for (int i = 0; i < svec->nnz; i++)
pq_sendfloat4(&buf, values[i]);
+2 -2
View File
@@ -413,8 +413,8 @@ vector_send(PG_FUNCTION_ARGS)
StringInfoData buf;
pq_begintypsend(&buf);
pq_sendint16(&buf, vec->dim);
pq_sendint16(&buf, vec->unused);
pq_sendint16(&buf, (uint16) vec->dim);
pq_sendint16(&buf, (uint16) vec->unused);
for (int i = 0; i < vec->dim; i++)
pq_sendfloat4(&buf, vec->x[i]);