alx-tools / Betty

Holberton-style C code checker written in Perl
GNU General Public License v3.0
1.27k stars 1.76k forks source link

WARNING: Prefer 'signed int' to bare use of 'signed' #54

Open hany0ageeb opened 1 year ago

hany0ageeb commented 1 year ago

char handle_d_i_specifier(const conversion_specification_t spec, va_list argptr) { char formatted_value = NULL, temp = NULL; signed long int d, len; char sp = spec != NULL ? spec->conversion_specifier : 'Z';

    if (sp == 'd' || sp == 'i')
    {
            d = handle_len_mod_for_signed(spec, argptr);

//////////////////////////////////////////////////////

long int handle_len_mod_for_signed(const conversion_specification_t *spec, va_list argptr) { long int value;

    if (spec->length_modifier == NULL)
            value = va_arg(argptr, int);
    else if (spec->length_modifier[0] == 'h')
            value = (short int)va_arg(argptr, int);
anas-asimi commented 1 year ago

did u found any solution

anas-asimi commented 1 year ago

just change the name of handle_len_mod_for_signed function to handle_len_mod_for_signed_int

anas-asimi commented 1 year ago

betty-style is stupid aF