Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
warning: implicit declaration of function 'memset'
src\main.c|66|warning: implicit declaration of function 'memset' [-Wimplicit-function-declaration]|

I am using a nucleo F401RE with an ST x-nucleo-nfc03a1 (RFID board)
Also, I've been converting the code available from ST to the 401RE.

here is my main :
#include "stm32f4xx_conf.h"
#include "string.h"

typedef struct
  uint8_t one[5];
  uint8_t two[23];


int main(void)

  uint8_t check[10];
  memset(check, '=', 7);

  //TEST test;
  //memset(, '-', 3);



The code used for driving the RFID board has been commented out and I am left with only the memset which by the way throws the warning.
Searching through all the headers reveal nothing out of the ordinary to me. Also I've searched through the .depend, .epb, and .elay files for clues. Again, everything looks copacetic.

For grins, I made a simple test project simply calling memset in the main and compiling worked without a hitch.

Mostly looking for guidance. Thanks in advance for all questions and comment.

If I add the following line from string.h directly into the source code, the warning goes away.

_PTR _EXFUN(memset,(_PTR, int, size_t));

Now I need to understand why #include "string.h" is not being processed correctly.

Forum Jump:

Users browsing this thread: 1 Guest(s)