Skip to content

fix compile warnings#2

Open
IanoNjuguna wants to merge 1 commit intoxyephy:masterfrom
IanoNjuguna:iano_Fix-Compile-Warnings
Open

fix compile warnings#2
IanoNjuguna wants to merge 1 commit intoxyephy:masterfrom
IanoNjuguna:iano_Fix-Compile-Warnings

Conversation

@IanoNjuguna
Copy link

Added #include <string.h> to resolve implicit function declaration warnings.

The code was using strncmp() and strchr() functions without including the necessary header, and it caused these compilation warnings:

  • warning: implicit declaration of function 'strncmp'
  • warning: implicit declaration of function 'strchr'
  • warning: incompatible implicit declaration of built-in function

Testing

  • Compiled with gcc -Wall -Wextra detect-cpu.c -o detect-cpu
  • All previous warnings are now resolved
  • Functionality works as intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments