[libdvdcss-devel] attributes.m4: Properly declare parameterless main() functions.

Diego Biurrun git at videolan.org
Thu Oct 30 17:16:28 CET 2014


libdvdcss | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Oct 22 12:59:03 2014 +0200| [55cb13e7c12c6f14612437e26fa013fe9e9babd0] | committer: Diego Biurrun

attributes.m4: Properly declare parameterless main() functions.

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=55cb13e7c12c6f14612437e26fa013fe9e9babd0
---

 m4/attributes.m4 |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/m4/attributes.m4 b/m4/attributes.m4
index 39d02e3..850a4ee 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -39,7 +39,7 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
   AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
     [ac_save_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $1"
-     AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
+     AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; }])],
        [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
        [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
      CFLAGS="$ac_save_CFLAGS"
@@ -89,7 +89,7 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
     AS_TR_SH([cc_cv_ldflags_$1]),
     [ac_save_LDFLAGS="$LDFLAGS"
      LDFLAGS="$LDFLAGS $1"
-     AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
+     AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 1; }])],
        [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
        [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
      LDFLAGS="$ac_save_LDFLAGS"
@@ -281,7 +281,7 @@ AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
      CFLAGS="$CFLAGS $cc_cv_werror"
      for cc_attribute_align_try in 64 32 16 8 4 2; do
         AC_COMPILE_IFELSE([
-          int main() {
+          int main(void) {
             static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
             return c;
           }], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])



More information about the libdvdcss-devel mailing list