We are working with Cassandra API in C generated by Thrift and have noticed a bug in the generated code for cassandra_client_send_batch_mutate().
Full code that Thrift generates for this function is attached, but here is the specification for Cassandra's batch_mutate method:
If we now look at the generated code, we will notice the following fragment:
We can see that in line A it uses the variable "value" as GHashTable, even though the GHashTable "value" was shadowed by GPtrArray "value" a line before.
Similarly, we can see another fragment below that one, where one instance of variable "value" shadows another instance:
We have worked around the bug in our particular case by renaming one of the "value" variables to "value2" (see "svn di -c 21176 svn://svn.zabbix.com/branches/dev/ZBXNEXT-844/src/libs/zbxcassa/cassandra.c@21176" for a diff), but it would be nice to fix it in Thrift, too.