@@ -157,7 +157,8 @@ func cGet(ptr *C.db_t, gasMeter *C.gas_meter_t, usedGas *cu64, key C.U8SliceView
157
157
// we received an invalid pointer
158
158
return C .GoError_BadArgument
159
159
}
160
- if ! (* val ).is_none || ! (* errOut ).is_none {
160
+ // errOut is unused and we don't check `is_none` because of https://github.com/CosmWasm/wasmvm/issues/536
161
+ if ! (* val ).is_none {
161
162
panic ("Got a non-none UnmanagedVector we're about to override. This is a bug because someone has to drop the old one." )
162
163
}
163
164
@@ -185,9 +186,7 @@ func cSet(ptr *C.db_t, gasMeter *C.gas_meter_t, usedGas *cu64, key C.U8SliceView
185
186
// we received an invalid pointer
186
187
return C .GoError_BadArgument
187
188
}
188
- if ! (* errOut ).is_none {
189
- panic ("Got a non-none UnmanagedVector we're about to override. This is a bug because someone has to drop the old one." )
190
- }
189
+ // errOut is unused and we don't check `is_none` because of https://github.com/CosmWasm/wasmvm/issues/536
191
190
192
191
gm := * (* types .GasMeter )(unsafe .Pointer (gasMeter ))
193
192
kv := * (* types .KVStore )(unsafe .Pointer (ptr ))
@@ -210,9 +209,7 @@ func cDelete(ptr *C.db_t, gasMeter *C.gas_meter_t, usedGas *cu64, key C.U8SliceV
210
209
// we received an invalid pointer
211
210
return C .GoError_BadArgument
212
211
}
213
- if ! (* errOut ).is_none {
214
- panic ("Got a non-none UnmanagedVector we're about to override. This is a bug because someone has to drop the old one." )
215
- }
212
+ // errOut is unused and we don't check `is_none` because of https://github.com/CosmWasm/wasmvm/issues/536
216
213
217
214
gm := * (* types .GasMeter )(unsafe .Pointer (gasMeter ))
218
215
kv := * (* types .KVStore )(unsafe .Pointer (ptr ))
@@ -286,7 +283,8 @@ func cNext(ref C.IteratorReference, gasMeter *C.gas_meter_t, usedGas *cu64, key
286
283
// we received an invalid pointer
287
284
return C .GoError_BadArgument
288
285
}
289
- if ! (* key ).is_none || ! (* val ).is_none || ! (* errOut ).is_none {
286
+ // errOut is unused and we don't check `is_none` because of https://github.com/CosmWasm/wasmvm/issues/536
287
+ if ! (* key ).is_none || ! (* val ).is_none {
290
288
panic ("Got a non-none UnmanagedVector we're about to override. This is a bug because someone has to drop the old one." )
291
289
}
292
290
@@ -337,7 +335,8 @@ func nextPart(ref C.IteratorReference, gasMeter *C.gas_meter_t, usedGas *cu64, o
337
335
// we received an invalid pointer
338
336
return C .GoError_BadArgument
339
337
}
340
- if ! (* output ).is_none || ! (* errOut ).is_none {
338
+ // errOut is unused and we don't check `is_none` because of https://github.com/CosmWasm/wasmvm/issues/536
339
+ if ! (* output ).is_none {
341
340
panic ("Got a non-none UnmanagedVector we're about to override. This is a bug because someone has to drop the old one." )
342
341
}
343
342
0 commit comments