Forums
warning: implicit declaration of function 'memset' - Printable Version

+- Forums (https://www.embitz.org/forum)
+-- Forum: ARM toolchains (https://www.embitz.org/forum/forum-8.html)
+--- Forum: ArmGCC - EmBlocks (https://www.embitz.org/forum/forum-14.html)
+--- Thread: warning: implicit declaration of function 'memset' (/thread-948.html)



warning: implicit declaration of function 'memset' - bbennett - 17-11-2018

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];


}TEST;

int main(void)
{

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

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

  while(1)
  {

  }
}

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.

bri


RE: warning: implicit declaration of function 'memset' - bbennett - 17-11-2018

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.