clike compilers: drop semicolon at function end

warning: ISO C does not allow extra ';' outside of a function [-Wpedantic]
pull/9362/head
Vladimír Čunát 3 years ago committed by Dylan Baker
parent bcfbfbb343
commit 98d1ec7a32
  1. 8
      mesonbuild/compilers/mixins/clike.py

@ -561,7 +561,7 @@ class CLikeCompiler(Compiler):
int main(void) {{ int main(void) {{
printf("%ld\\n", (long)({expression})); printf("%ld\\n", (long)({expression}));
return 0; return 0;
}};''' }}'''
res = self.run(t, env, extra_args=extra_args, res = self.run(t, env, extra_args=extra_args,
dependencies=dependencies) dependencies=dependencies)
if not res.compiled: if not res.compiled:
@ -599,7 +599,7 @@ class CLikeCompiler(Compiler):
int main(void) {{ int main(void) {{
printf("%ld\\n", (long)(sizeof({typename}))); printf("%ld\\n", (long)(sizeof({typename})));
return 0; return 0;
}};''' }}'''
res = self.run(t, env, extra_args=extra_args, res = self.run(t, env, extra_args=extra_args,
dependencies=dependencies) dependencies=dependencies)
if not res.compiled: if not res.compiled:
@ -886,7 +886,7 @@ class CLikeCompiler(Compiler):
void bar(void) {{ void bar(void) {{
{typename} foo; {typename} foo;
{members} {members}
}};''' }}'''
return self.compiles(t, env, extra_args=extra_args, return self.compiles(t, env, extra_args=extra_args,
dependencies=dependencies) dependencies=dependencies)
@ -896,7 +896,7 @@ class CLikeCompiler(Compiler):
t = f'''{prefix} t = f'''{prefix}
void bar(void) {{ void bar(void) {{
sizeof({typename}); sizeof({typename});
}};''' }}'''
return self.compiles(t, env, extra_args=extra_args, return self.compiles(t, env, extra_args=extra_args,
dependencies=dependencies) dependencies=dependencies)

Loading…
Cancel
Save