0 Replies Latest reply: Dec 4, 2012 11:58 AM by 448678 RSS

    Pro*C upgrade from 8.0.6 to 11g

    448678
      I am hoping someone understands this logic and can suggest a code fix.

      When recompiling in 11g, I get 'incompatible types in assignment' on the lines containing:
      args = (char *)&Text + sizeof(Text);

      I hope the following is enough to for someone to understand.

      void DoLog(int Severity, struct sqlca sqlca, struct oraca oraca, char *Text, ...)
      {
      char logline[4096]; /* The buffer to log into */
      char logtime[80]; /* temp buffer to hold log time */
      char logLevel[80]; /* temp buffer to hold severity level */
      char logmesg[2048]; /* temp buffer to hold message */
      time_t logTime;
      struct tm *tmTime;
      va_list args;

      logTime = time(0);
      tmTime = localtime(&logTime);
      strftime(logtime, sizeof(logtime), "%d-%b %a %H:%M:%S", tmTime);
      switch(Severity)
      {
      case (LOG_START):
      strcpy(logLevel, "(INIT)");
      fputs(BAR, logfile);
      fputs("\n", logfile);
      args = (char *)&Text + sizeof(Text);
      vsprintf(logmesg, Text, args);
      va_end(args);
      break;

      Edited by: user445675 on Dec 4, 2012 9:51 AM