提交 e08e7c25 编写于 作者: J Jesse Zhang 提交者: Adam Berlin

Array-to-Pointer Decay

This eliminates the warning "incompatible pointer types" as in:

```
greenplum_five_to_greenplum_six_upgrade_test.c:137:23: warning: incompatible pointer types passing 'User *(*)[10]' to parameter of type 'User **' (aka 'struct UserData **') [-Wincompatible-pointer-types]
        initialize_user_rows(&rows, size);
                             ^~~~~
```
上级 8eca101a
......@@ -134,13 +134,13 @@ heapTableShouldHaveDataUpgradedToSixCluster()
const int size = 10;
User *rows[size];
initialize_user_rows(&rows, size);
extract_user_rows(result, &rows);
initialize_user_rows(rows, size);
extract_user_rows(result, rows);
assert_number_of_rows(&rows, 3, size);
assert_rows_contain_user((User) {.id=1, .name="Jane"}, &rows, size);
assert_rows_contain_user((User) {.id=2, .name="John"}, &rows, size);
assert_rows_contain_user((User) {.id=3, .name="Joe"}, &rows, size);
assert_number_of_rows(rows, 3, size);
assert_rows_contain_user((User) {.id=1, .name="Jane"}, rows, size);
assert_rows_contain_user((User) {.id=2, .name="John"}, rows, size);
assert_rows_contain_user((User) {.id=3, .name="Joe"}, rows, size);
PQfinish(connection);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册