waf: fix some missing newline compiler warnings
authorBjörn Jacke <bj@sernet.de>
Sat, 9 Feb 2019 00:30:50 +0000 (01:30 +0100)
committerBjoern Jacke <bjacke@samba.org>
Sun, 17 Feb 2019 12:33:14 +0000 (13:33 +0100)
without a trailing newline the studio compiler issues:

warning: newline not last character in file

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
buildtools/wafsamba/samba_autoconf.py
buildtools/wafsamba/samba_conftests.py
buildtools/wafsamba/wscript

index 6208e3b0439f0fac66028e29e66f8337ea5cce60..9d45ada13121ff8bce33a5da50aff7691a257c1e 100644 (file)
@@ -97,7 +97,7 @@ def CHECK_HEADER(conf, h, add_headers=False, lib=None):
     hdrs = hlist_to_string(conf, headers=h)
     if lib is None:
         lib = ""
-    ret = conf.check(fragment='%s\nint main(void) { return 0; }' % hdrs,
+    ret = conf.check(fragment='%s\nint main(void) { return 0; }\n' % hdrs,
                      type='nolink',
                      execute=0,
                      cflags=ccflags,
index 7d9b531690236cd482efb984ea1387180c3ea7f1..96345ca00c6355386e2b40678635c0309cb9c736 100644 (file)
@@ -258,7 +258,8 @@ int foo(int v) {
     environ[0] = 1;
     ldb_module = PyImport_ImportModule("ldb");
     return v * 2;
-}'''
+}
+'''
     return conf.check(features='c cshlib',uselib='PYEMBED',fragment=snip,msg=msg, mandatory=False)
 
 # this one is quite complex, and should probably be broken up
@@ -463,7 +464,7 @@ def CHECK_INLINE(conf):
         ret = conf.CHECK_CODE('''
         typedef int foo_t;
         static %s foo_t static_foo () {return 0; }
-        %s foo_t foo () {return 0; }''' % (i, i),
+        %s foo_t foo () {return 0; }\n''' % (i, i),
                               define='INLINE_MACRO',
                               addmain=False,
                               link=False)
index 57d8a1504e186d7a5571e5ec8ece90faa7a2e2a0..86293d347a1cd0994969971d44a2d2ea60bcf98f 100644 (file)
@@ -351,7 +351,7 @@ def configure(conf):
     if conf.CHECK_CFLAGS(['-fvisibility=hidden'] + conf.env.WERROR_CFLAGS):
         conf.env.VISIBILITY_CFLAGS = '-fvisibility=hidden'
         conf.CHECK_CODE('''int main(void) { return 0; }
-                           __attribute__((visibility("default"))) void vis_foo2(void) {}''',
+                           __attribute__((visibility("default"))) void vis_foo2(void) {}\n''',
                         cflags=conf.env.VISIBILITY_CFLAGS,
                         strict=True,
                         define='HAVE_VISIBILITY_ATTR', addmain=False)
@@ -521,7 +521,7 @@ struct foo bar = { .y = 'X', .x = 1 };
                         #if !defined(LITTLE) || !defined(B) || LITTLE != B
                         #error Not little endian.
                         #endif
-                        int main(void) { return 0; }""",
+                        int main(void) { return 0; }\n""",
                             addmain=False,
                             headers="endian.h sys/endian.h",
                             define="HAVE_LITTLE_ENDIAN")
@@ -540,7 +540,7 @@ struct foo bar = { .y = 'X', .x = 1 };
                         #if !defined(BIG) || !defined(B) || BIG != B
                         #error Not big endian.
                         #endif
-                        int main(void) { return 0; }""",
+                        int main(void) { return 0; }\n""",
                             addmain=False,
                             headers="endian.h sys/endian.h",
                             define="HAVE_BIG_ENDIAN")