Skip to content

Commit

Permalink
Remove the usage of returns_nonnull to make sure that we'll compile w…
Browse files Browse the repository at this point in the history
…ith gcc 4.8.x again

Summary:
The issue was exposed by facebook/mysql-5.6#207. The root cause is the fact that gcc 4.8.x doesn't implement a support for `returns_nonnull`. Take a look at https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Function-Attributes.html vs. https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Function-Attributes.html.

For last couple of months we've been operating under the assumption that gcc 4.9.x is the lowest supported platform. We need to go back and internally either revisit this decision or be very explicit about our dependency requirements.

Test Plan:
Optimistic fix, needs to be really verified on the system running gcc 4.8.x.

```
mysqlbuild.sh
```

Reviewers: yoshinorim, MarkCallaghan

Reviewed By: MarkCallaghan

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D55641
  • Loading branch information
Gunnar Kudrjavets committed Mar 17, 2016
1 parent f6d330c commit 730c64f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion ha_rocksdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ class ha_rocksdb: public handler
ulong index_flags(uint inx, uint part, bool all_parts) const;

const key_map * keys_to_use_for_scanning()
__attribute__((__returns_nonnull__))
{
return &key_map_full;
}
Expand Down
6 changes: 3 additions & 3 deletions ha_rocksdb_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ void request_save_stats();

class Dict_manager;
Dict_manager *get_dict_manager(void)
__attribute__((__returns_nonnull__, __warn_unused_result__));
__attribute__((__warn_unused_result__));

class Table_ddl_manager;
Table_ddl_manager *get_ddl_manager(void)
__attribute__((__returns_nonnull__, __warn_unused_result__));
__attribute__((__warn_unused_result__));

class Binlog_info_manager;
Binlog_info_manager *get_binlog_manager(void)
__attribute__((__returns_nonnull__, __warn_unused_result__));
__attribute__((__warn_unused_result__));

} // namespace myrocks

Expand Down

0 comments on commit 730c64f

Please sign in to comment.