Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7591077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:33:58+00:00 2026-05-30T20:33:58+00:00

WARNING: While resolving call to function ‘help’ arguments were dropped! If I compile using

  • 0

WARNING: While resolving call to function 'help' arguments were dropped!

If I compile using gcc -O3 codice -o out/codice I get this pesky warning. It finishes compiling, so I am just wondering why this is happening.

I’m on a mac on lion with xcode 4.3 installed. The compiler it is using is i686-apple-darwin11-llvm-gcc-4.2

Note that if I switch the -O3 to -O2/-O1/-O then it continues to give the same warning

The code is as follows….

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <math.h>

void help();

char *codice_encrypt(char *in);
char *codice_decrypt(char *in);

void sigint_handler(int signal) {
    exit(2);
}

int main (int argc, char **argv) {

    if (argc != 3) {
        help();
    }

    signal(SIGINT, sigint_handler);
    char *ret, *status;
    int tmpret;

    if (strcmp(argv[1], "e") == 0 || strcmp(argv[1], "encrypt") == 0) {
        status = "Encrypting...\n";
        tmpret = write(STDOUT_FILENO, status, strlen((const char *)status));
        ret = codice_encrypt(argv[2]);
    } else if (strcmp(argv[1], "d") == 0 || strcmp(argv[1], "decrypt") == 0) {
        status = "Decrypting...\n";
        tmpret = write(STDOUT_FILENO, status, strlen((const char *)status));
        ret = codice_decrypt(argv[2]);
    } else {
        status = "Could not understand command line arguments O.o\n";
        tmpret = write(STDOUT_FILENO, status, strlen((const char *)status));
        help(STDOUT_FILENO);
    }

    status = "Success!\nRetval:\n\n";
    tmpret = write(STDOUT_FILENO, status, strlen((const char *)status));
    tmpret = write(STDOUT_FILENO, ret, strlen((const char *)ret));
    tmpret = write(STDOUT_FILENO, "\n\n", 2);

    return 0;

}

void help() {
    int tmpret;
    const char *logo = "\n\n\t\tooooooo__oo______________________\n"
                 "\t\t_____oo______oo_oo_oo__oo_oo_oo__\n"
                 "\t\t____oo___oo__ooo_oo__o_ooo_oo__o_\n"
                 "\t\t___o_____oo__oo__oo__o_oo__oo__o_\n"
                 "\t\t_oo______oo__oo__oo__o_oo__oo__o_\n"
                 "\t\tooooooo_oooo_oo______o_oo______o_\n"
                 "\t\t_________________________________\n\n\n";
    tmpret = write(STDOUT_FILENO, logo, strlen(logo));
    const char *help = "Help\n"
                       "Is\n"
                       "Still\n"
                       "Being\n"
                       "Written :)\n\n";
    tmpret = write(STDOUT_FILENO, help, strlen(help));
    exit(1);
}

char *codice_encrypt(char *in) {
    unsigned int i;
    char ya = 0x55;
    write(STDOUT_FILENO, "0x", 2);
    char itret[50];
    sprintf(itret,"%#hhx",ya);
    write(STDOUT_FILENO, itret, strlen(itret));
    write(STDOUT_FILENO, "\n", 1);
    ya = ya & 0x0F;
    ya = ya >> 1;
    sprintf(itret,"%#hhx",ya);
    write(STDOUT_FILENO, itret, strlen(itret));
    write(STDOUT_FILENO, "\n", 1);
    ya = 0x55;
    ya = ya & 0xF0;
    ya = ya << 1;
    sprintf(itret,"%#hhx",ya);
    write(STDOUT_FILENO, itret, strlen(itret));
    write(STDOUT_FILENO, "\n", 1);
    return in;
}

char *codice_decrypt(char *in) {
    return in;
}

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:34:00+00:00Added an answer on May 30, 2026 at 8:34 pm

    Here help() has variable number of arguments (I assume we’re talking about C code). However, no arguments were passed and no arguments were read. One of optimization passes realized this and issued such a warning. Defining help() as help(void) will fix the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using GWT I get following warning: Referencing deprecated class 'com.google.gwt.user.client.rpc.SerializableException' While it's only
I have an warning while returning an NSInteger. I am using UITableView's inbuilt method
Do we have any plugin/way in eclipse that forbids(show error/warning) while using some method.
I have an error and a warning while trying to compile my linked list
While compiling a program in Java I got this big WARNING warning: [unchecked] unchecked
While creating the setup for VB.net application I am getting the following warning: Warning
While building a JAR file (successfully) in Netbeans 7.1.1 , I encountered this warning:
(Warning: Clueless Rails Newbie!) In my show.html.erb for my albums view, I call a
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home/happy/public_html/source/imap/fet_mail_from_email_add.php on line 7 can't connect:
I am getting inling warning such as : warning: inlining failed in call to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.