]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #1222 from SaberUK/master+warnings
authorAttila Molnar <attilamolnar@hush.com>
Fri, 16 Sep 2016 08:55:29 +0000 (10:55 +0200)
committerGitHub <noreply@github.com>
Fri, 16 Sep 2016 08:55:29 +0000 (10:55 +0200)
Fix various compiler warnings

1  2 
src/modules/extra/m_geoip.cpp
src/modules/extra/m_ldap.cpp

index 564599bf8c3c34423d3f098cdb4568514b5e3978,570901430be5dae46f5455df8ab8048623933e40..b350ede904f0999b49831dc39c3aaf4bbe9f4237
   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  
 +/// $CompilerFlags: find_compiler_flags("geoip" "")
 +/// $LinkerFlags: find_linker_flags("geoip" "-lGeoIP")
 +
 +/// $PackageInfo: require_system("darwin") geoip pkg-config
 +/// $PackageInfo: require_system("ubuntu") libgeoip-dev pkg-config
  
  #include "inspircd.h"
  #include "xline.h"
  
+ // Fix warnings about the use of commas at end of enumerator lists on C++03.
+ #if defined __clang__
+ # pragma clang diagnostic ignored "-Wc++11-extensions"
+ #elif defined __GNUC__
+ # pragma GCC diagnostic ignored "-pedantic"
+ #endif
  #include <GeoIP.h>
  
  #ifdef _WIN32
  # pragma comment(lib, "GeoIP.lib")
  #endif
  
 -/* $LinkerFlags: -lGeoIP */
 -
  class ModuleGeoIP : public Module
  {
        LocalStringExt ext;
index 67a4e6745ba4d3166fed87defcdfef4001165527,2081108a8b15751739423e749684c50ad52f32dc..78cce50bd61de48f8483b75c8586c8c888964f60
   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  
 +/// $LinkerFlags: -llber -lldap_r
 +/// $PackageInfo: require_system("ubuntu") libldap2-dev
 +
  #include "inspircd.h"
  #include "modules/ldap.h"
  
+ // Ignore OpenLDAP deprecation warnings on OS X Yosemite and newer.
+ #if defined __APPLE__
+ # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ #endif
  #include <ldap.h>
  
  #ifdef _WIN32
@@@ -30,6 -32,8 +35,6 @@@
  # pragma comment(lib, "liblber.lib")
  #endif
  
 -/* $LinkerFlags: -lldap_r -llber */
 -
  class LDAPService;
  
  class LDAPRequest