Author Topic: warning: implicit declaration of function  (Read 1891 times)

Offline fopetesl

  • Single posting newcomer
  • *
  • Posts: 8
warning: implicit declaration of function
« on: June 27, 2017, 06:32:41 pm »
Compiling C code in Win7 32 bit I get this warning:
Code: [Select]
C:\Ha\HaS3.c|556|warning: implicit declaration of function '_fileno' [-Wimplicit-function-declaration]
_fileno() is defined in stdio.h which I checked and is being included.

Code: [Select]
sprintf( catime,"logs/%02d%02d%d.bas",tm_now->tm_mday,tm_now->tm_mon,tm_now->tm_year);

   flog = fopen( catime, "r");             /** if open has already been written    **/
   if( flog) { bline = 1; fclose( flog); flog = 0; } /** so close it               **/
   if( !bline) flog = fopen( catime, "w");
   if( flog)  flogn = _fileno( flog);

I have not redefined it and oddly enough this warning does not appear on another computer running 64 bit Win7.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7011
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org