Author Topic: Old style function definition  (Read 2594 times)

caballero

  • Member
  • ****
  • Posts: 760
    • Abre Ojos Ensamblador
Old style function definition
« on: May 24, 2013, 07:32:35 PM »
Hello, what PellesC means with this warning? For example in:
Code: [Select]
void ClearDIB () {
  memset(pMainDIB, 0, cdXSize*cdYSize*4);
}
En un lugar de la Mancha de cuyo nombre no quiero acordarme

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: Old style function definition
« Reply #1 on: May 24, 2013, 11:01:10 PM »
Adding a parameter of type void to the parameter list eliminated the warning.
Code: [Select]
void ClearDIB(void) {
  memset(pMainDIB, 0, cdXSize*cdYSize*4);
}
Well Microsoft, here’s another nice mess you’ve gotten us into.

Gunther

  • Member
  • *****
  • Posts: 3515
  • Forgive your enemies, but never forget their names
Re: Old style function definition
« Reply #2 on: May 24, 2013, 11:01:37 PM »
Hi Alfonso,

Hello, what PellesC means with this warning? For example in:
Code: [Select]
void ClearDIB () {
  memset(pMainDIB, 0, cdXSize*cdYSize*4);
}

yes, Michael is right. Its the easy way.

Gunther
Get your facts first, and then you can distort them.