Skip to content

Fix several compiler warnings and make warnings fatal errors #49

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

Merged
merged 4 commits into from
Nov 29, 2017

Conversation

tiran
Copy link
Member

@tiran tiran commented Nov 28, 2017

  • Correct return LDAPerror_TypeError(). LDAPerror_TypeError() returns (PyObject *)NULL. Some functions don't return a PyObject* so technically it's wrong to return (PyObject *)NULL. Return NULL instead.
  • Fix implicit declaration of error functions, ldapcontrol.c was missing include of constants.h that defines LDAPerr() and LDAPerror().
  • Make init_ldap_module definition a strict prototype
  • Travis: Turn compiler warnings into fatal errors

@codecov
Copy link

codecov bot commented Nov 28, 2017

Codecov Report

Merging #49 into master will decrease coverage by 0.05%.
The diff coverage is 11.11%.

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
- Coverage   63.31%   63.25%   -0.06%     
==========================================
  Files          46       46              
  Lines        4391     4395       +4     
  Branches      749      749              
==========================================
  Hits         2780     2780              
- Misses       1287     1291       +4     
  Partials      324      324
Impacted Files Coverage Δ
Modules/ldapcontrol.c 52.07% <0%> (-0.31%) ⬇️
Modules/LDAPObject.c 67.31% <0%> (-0.31%) ⬇️
Modules/ldapmodule.c 72.72% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ece4738...5b2d2f9. Read the comment docs.

@tiran tiran force-pushed the compiler_warnings branch 6 times, most recently from d89f9b7 to ae985e2 Compare November 29, 2017 07:48
@encukou
Copy link
Member

encukou commented Nov 29, 2017

Code changes LGTM, but see #53 for the CFLAGS setting.

LDAPerror_TypeError() returns (PyObject *)NULL. Some functions don't
return a PyObject* so technically it's wrong to return (PyObject *)NULL.
Return NULL instead.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
ldapcontrol.c was missing include of constants.h that defines LDAPerr()
and LDAPerror().

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran force-pushed the compiler_warnings branch from ae985e2 to 5b2d2f9 Compare November 29, 2017 14:05
@encukou encukou merged commit 773defa into python-ldap:master Nov 29, 2017
@tiran tiran deleted the compiler_warnings branch November 29, 2017 14:14
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy