NO

Author Topic: Local XXX is initialized but never used.  (Read 3401 times)

real

  • Guest
Local XXX is initialized but never used.
« on: October 12, 2005, 01:56:30 PM »
Hi,

why do i get a "warning #2115: Local 'i' is initialized but never used." while compiling this code:

Code: [Select]

   int i = -1;

   AllocConsole();

   i = setvbuf(stdout, NULL, _IONBF, 0);

?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Local XXX is initialized but never used.
« Reply #1 on: October 13, 2005, 02:32:32 PM »
Because you are only assigning values to i, never using the value of i...

Pelle
/Pelle