Skip to content

Commit b67badc

Browse files
Declare main void when argc and argv are unused
1 parent 3934735 commit b67badc

File tree

6 files changed

+4
-31
lines changed

6 files changed

+4
-31
lines changed

axoverlay/app/axoverlay.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,8 @@ static gboolean signal_handler(gpointer loop) {
342342
*
343343
* This main function draws two plain boxes and one text, using the
344344
* API axoverlay.
345-
*
346-
* param argc Number of arguments.
347-
* param argv Arguments vector.
348345
*/
349-
int main(int argc, char** argv) {
350-
/* Silence compiler warnings for unused parameters/arguments */
351-
(void)argc;
352-
(void)argv;
353-
346+
int main(void) {
354347
GMainLoop* loop = NULL;
355348
GError* error = NULL;
356349
GError* error_text = NULL;

axstorage/app/axstorage.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,6 @@ static disk_item_t* new_disk_item_t(gchar* storage_id) {
368368
/**
369369
* @brief Main function
370370
*
371-
* @param argc Number of arguments
372-
* @param argv Arguments vector
373-
*
374371
* @return Result
375372
*/
376373
gint main(void) {

curl-openssl/app/curl_openssl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,5 +226,4 @@ int main(void) {
226226
}
227227
// Cleanup of curl global environment
228228
curl_global_cleanup();
229-
return 0;
230229
}

hello-world/app/hello_world.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,8 @@
2929
* brief Main function.
3030
*
3131
* This main function writes "hello_world" to the syslog.
32-
*
33-
* param argc Number of arguments.
34-
* param argv Arguments vector.
3532
*/
36-
int main(int argc, char** argv) {
37-
/* Silence compiler warnings for unused parameters/arguments */
38-
(void)argc;
39-
(void)argv;
40-
33+
int main(void) {
4134
/* Open the syslog to report messages for "hello_world" */
4235
openlog("hello_world", LOG_PID | LOG_CONS, LOG_USER);
4336

message-broker/consume-scene-metadata/app/consume_scene_metadata.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ static void sig_handler(int signum) {
8080
// Do nothing, just let pause in main return.
8181
}
8282

83-
int main(int argc, char** argv) {
84-
(void)argc;
85-
(void)argv;
83+
int main(void) {
8684
syslog(LOG_INFO, "Subscriber started...");
8785

8886
// For com.axis.analytics_scene_description.v0.beta source corresponds to the

reproducible-package/app/reproducible_package.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,8 @@
2929
* brief Main function.
3030
*
3131
* This main function writes "Hello Reproducible World" to the syslog.
32-
*
33-
* param argc Number of arguments.
34-
* param argv Arguments vector.
3532
*/
36-
int main(int argc, char** argv) {
37-
/* Silence compiler warnings for unused parameters/arguments */
38-
(void)argc;
39-
(void)argv;
40-
33+
int main(void) {
4134
/* Open the syslog to report messages for "reproducible_package" */
4235
openlog("reproducible_package", LOG_PID | LOG_CONS, LOG_USER);
4336

0 commit comments

Comments
 (0)