File tree Expand file tree Collapse file tree 11 files changed +11
-13
lines changed
Expand file tree Collapse file tree 11 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 11#include <stdio.h>
22
3- void second () {
3+ void second ( void ) {
44 printf ( "Hi, from second.c!\n" );
55}
Original file line number Diff line number Diff line change 11#ifndef SECOND_H_
22#define SECOND_H_
33
4- void second ();
4+ void second ( void );
55
66#endif // you can replace all three #... with just `#pragma once` at the top
Original file line number Diff line number Diff line change @@ -6,6 +6,4 @@ Repository: https://github.com/capnramses/pro_programming_tools_c_cpp
66
77#include <stdio.h>
88
9- void second () {
10- printf ( "Hi, from second.c!\n" );
11- }
9+ void second ( void ) { printf ( "Hi, from second.c!\n" ); }
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Repository: https://github.com/capnramses/pro_programming_tools_c_cpp
1212extern "C" {
1313#endif
1414
15- void second ();
15+ void second ( void );
1616
1717#ifdef __cplusplus
1818}
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ Repository: https://github.com/capnramses/pro_programming_tools_c_cpp
66#include "second.h" // include any symbol 'export' from the declarations
77#include <stdio.h>
88
9- void second () {
9+ void second ( void ) {
1010 printf ( "Hi, from second.c!\n" );
1111}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Repository: https://github.com/capnramses/pro_programming_tools_c_cpp
1818extern "C" {
1919#endif
2020
21- EXPORT_SEC void second ();
21+ EXPORT_SEC void second ( void );
2222
2323#ifdef __cplusplus
2424}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ If you apply `clang-format` to these files it will format them using the .clang-
1414
1515
1616
17- int main ( ) {
17+ int main ( void ) {
1818 printf ( "hi from main()!\n" );
1919
2020
Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ If you apply `clang-format` to these files it will format them using the .clang-
1111
1212#include <stdio.h>
1313
14- void second () {
14+ void second ( void ) {
1515
1616 printf ("Hi, from second.c!\n" ); }
Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ If you apply `clang-format` to these files it will format them using the .clang-
1212#ifndef SECOND_H_
1313 #define SECOND_H_
1414
15- void second ();
15+ void second ( void );
1616
1717 #endif // you can replace all three #... with just `#pragma once` at the top
Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ Using GCC:
99
1010#include <stdio.h>
1111
12- void my_print () {
12+ void my_print ( void ) {
1313 printf ("hi from the lib!\n" );
1414}
You can’t perform that action at this time.
0 commit comments