OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:41 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: POSIX-UEFI helllo world
PostPosted: Sat Feb 20, 2021 11:52 am 
Offline
Member
Member

Joined: Fri Nov 22, 2019 5:46 am
Posts: 590
I thought this would be inapproprieate in the project's announcement thread, so here it is:

In POSIX-UEFI's hello world
https://gitlab.com/bztsrc/posix-uefi/-/ ... lloworld.c
there are two lines:
Code:
    (void)argc;
    (void)argv;

I don't understand what that is. Are these type conversions? Are these function pointers?

Greetings
Peter


Top
 Profile  
 
 Post subject: Re: POSIX-UEFI helllo world
PostPosted: Sat Feb 20, 2021 12:16 pm 
Offline
Member
Member

Joined: Sun Aug 23, 2020 4:35 pm
Posts: 148
PeterX wrote:
there are two lines:
Code:
    (void)argc;
    (void)argv;
I don't understand what that is. Are these type conversions? Are these function pointers?

Those simply make the compiler not give a warning about unused parameters. It would run fine even without them.

_________________
My OS: TritiumOS
https://github.com/foliagecanine/tritium-os
void warranty(laptop_t laptop) { if (laptop.broken) return laptop; }
I don't get it: Why's the warranty void?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group