Crystal Space
Welcome, Guest. Please login or register.
November 26, 2014, 02:56:08 am

Login with username, password and session length
Search:     Advanced search
9026 Posts in 2046 Topics by 9129 Members
Latest Member: Kosmobruk66
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Crystal Space Development / Support / Unused variable error at compile time on: October 13, 2013, 12:42:35 am
I'm getting an unused variable error when I try to compile CS, in cs/include/iutil, in the following section: (please bear with me, I've only recently started learning C++)

Code:
/home/rogue_mouser/workspace/crystal/libs/csutil/event.cpp: In static member function ‘static bool csMouseEventHelper::GetEventData(const iEvent*, csMouseEventData&)’:
/home/rogue_mouser/workspace/crystal/libs/csutil/event.cpp:252:16: warning: variable ‘ok’ set but not used [-Wunused-but-set-variable]


Code:
bool csMouseEventHelper::GetEventData (const iEvent* event,
       csMouseEventData& data)
{
  // if (!CS_IS_MOUSE_EVENT (*event)) return false; // Need an iObjectRegistry* to do this...

  const void *_ax = 0; size_t _ax_sz = 0;
  uint8 ui8;
  [b]csEventError ok = csEventErrNone;[/b]
  ok = event->Retrieve("mAxes", _ax, _ax_sz);
  CS_ASSERT(ok == csEventErrNone);
  ok = event->Retrieve("mNumAxes", ui8);
  CS_ASSERT(ok == csEventErrNone);
  data.numAxes = ui8;
  for (uint iter=0 ; iter<CS_MAX_MOUSE_AXES ; iter++)
  {
    if (iter<data.numAxes)
      data.axes[iter] = ((int32*)_ax)[iter];
    else
      data.axes[iter] = 0;
  }
  data.x = data.axes[0];
  data.y = data.axes[1];
  int i8;
  ok = event->Retrieve("mButton", i8);
  CS_ASSERT(ok == csEventErrNone);
  data.Button = i8;
  const void* m;
  size_t mSize;
  ok = event->Retrieve("keyModifiers", m, mSize);
  CS_ASSERT(ok == csEventErrNone);
  CS_ASSERT(mSize == sizeof (csKeyModifiers));
  data.Modifiers = csKeyEventHelper::GetModifiersBits (*((csKeyModifiers*)m));
  return true;
}

As I stated, I've only recently started learning C++, but it looks to me as if the variable "ok" is being used. The same error occurs a few other places in the file, but in theory I only need one answer. I hope.
2  Crystal Space Development / Support / CS not recognizing cegui on: October 10, 2013, 03:54:38 am
I'm having a good deal of difficulty getting CS to compile on Linux MInt Debian Edition. I've been at it for several days, and I've made some progress, but it hasn't worked yet. (I'm going through the latest compile log as I write this.)

One thing that's been consistent from the start is that running the configure script always shows that cegui and assimp are both missing, but both are installed on my system. I've even re-compiled them just to be sure.

I did try the .deb package, but it seemed to want an earlier version of a package than the one on my system, and wouldn't install. I don't remember which package it was ... sorry for that oversight,

Anyway, why might CS be thinking that assimp and cegui aren't installed, and how can I convince it otherwise?

- Version of CS - 2.0 (stable release, downloaded Sept 25/13)
- Operating system - LMDE (Linux Mint Debian Edition)
- Compiler - GNU (g++)
- Video card - AMD Radeon HD 6310
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.196 seconds with 17 queries.