Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHON-2331 Fix set_memory_error complier warning #469

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

ShaneHarvey
Copy link
Member

bson/buffer.c:36:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   36 | static void set_memory_error() {
      |             ^~~~~~~~~~~~~~~~

Jira: https://jira.mongodb.org/browse/PYTHON-2331

bson/buffer.c:36:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   36 | static void set_memory_error() {
      |             ^~~~~~~~~~~~~~~~
@ShaneHarvey
Copy link
Member Author

Compile is clean now:

 [2020/07/23 00:31:31.453] Running auth tests over ssl with python /opt/python/3.5/bin/python3
 [2020/07/23 00:31:31.453] 3.5.9 (default, Jun 25 2020, 03:29:06)
 [2020/07/23 00:31:31.453] [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]
 [2020/07/23 00:31:31.765] Coverage.py, version 5.1 with C extension
 [2020/07/23 00:31:31.765] Full documentation is at https://coverage.readthedocs.io
 [2020/07/23 00:31:33.670] INFO: coverage is installed, running tests with coverage...
 [2020/07/23 00:31:33.670] running clean
 [2020/07/23 00:31:33.670] running build_ext
 [2020/07/23 00:31:33.771] building 'bson._cbson' extension
 [2020/07/23 00:31:33.771] creating build
 [2020/07/23 00:31:33.771] creating build/temp.linux-x86_64-3.5
 [2020/07/23 00:31:33.771] creating build/temp.linux-x86_64-3.5/bson
 [2020/07/23 00:31:33.771] gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ibson -I/opt/python/3.5/include/python3.5m -c bson/_cbsonmodule.c -o build/temp.linux-x86_64-3.5/bson/_cbsonmodule.o
 [2020/07/23 00:31:34.728] gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ibson -I/opt/python/3.5/include/python3.5m -c bson/time64.c -o build/temp.linux-x86_64-3.5/bson/time64.o
 [2020/07/23 00:31:34.868] gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ibson -I/opt/python/3.5/include/python3.5m -c bson/buffer.c -o build/temp.linux-x86_64-3.5/bson/buffer.o
 [2020/07/23 00:31:34.931] gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ibson -I/opt/python/3.5/include/python3.5m -c bson/encoding_helpers.c -o build/temp.linux-x86_64-3.5/bson/encoding_helpers.o
 [2020/07/23 00:31:34.955] gcc -pthread -shared -Wl,--enable-new-dtags,-rpath,/opt/python/3.5/lib build/temp.linux-x86_64-3.5/bson/_cbsonmodule.o build/temp.linux-x86_64-3.5/bson/time64.o build/temp.linux-x86_64-3.5/bson/buffer.o build/temp.linux-x86_64-3.5/bson/encoding_helpers.o -L/opt/python/3.5/lib -lpython3.5m -o /data/mci/830893c053272b3a7b86493db3357392/src/bson/_cbson.cpython-35m-x86_64-linux-gnu.so
 [2020/07/23 00:31:34.988] building 'pymongo._cmessage' extension
 [2020/07/23 00:31:34.988] creating build/temp.linux-x86_64-3.5/pymongo
 [2020/07/23 00:31:34.988] gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ibson -I/opt/python/3.5/include/python3.5m -c pymongo/_cmessagemodule.c -o build/temp.linux-x86_64-3.5/pymongo/_cmessagemodule.o
 [2020/07/23 00:31:35.343] gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ibson -I/opt/python/3.5/include/python3.5m -c bson/buffer.c -o build/temp.linux-x86_64-3.5/bson/buffer.o
 [2020/07/23 00:31:35.407] gcc -pthread -shared -Wl,--enable-new-dtags,-rpath,/opt/python/3.5/lib build/temp.linux-x86_64-3.5/pymongo/_cmessagemodule.o build/temp.linux-x86_64-3.5/bson/buffer.o -L/opt/python/3.5/lib -lpython3.5m -o /data/mci/830893c053272b3a7b86493db3357392/src/pymongo/_cmessage.cpython-35m-x86_64-linux-gnu.so
 [2020/07/23 00:31:36.588] running test
 [2020/07/23 00:31:36.588] running egg_info
 [2020/07/23 00:31:36.588] creating pymongo.egg-info

Copy link
Contributor

@prashantmital prashantmital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know that methods without any arguments needed to have void for the signature to be correct.
LGTM

@prashantmital
Copy link
Contributor

@ShaneHarvey ShaneHarvey merged commit c16b5b9 into mongodb:master Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants