project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AndyZCS

Pages: [1]
1
Coding / Re: codeblocks compile warnings
« on: October 21, 2012, 05:29:46 pm »

In various header files used by UFO & UFO_TESTALL there are uses of
'__attribute__((format(printf' to enable the compiler to perform additional checks.
Changing this to '__attribute__((format(__printf__' stops the preprocessor from causing the warning in the C::B environment.

Ref: http://docs.freebsd.org/info/gcc/gcc.info.Function_Attributes.html

"   You may also specify attributes with `__' preceding and following
each keyword.  This allows you to use them in header files without
being concerned about a possible macro of the same name.  For example,
you may use `__noreturn__' instead of `noreturn'."

I have had this working on my local copy for a few months & haven't seen any side effects in C::B

Regards
   Andy


2
Bugs prior to release 2.4 / Re: Alien Materials from Harvester disassembling
« on: September 28, 2011, 01:30:43 am »
Approximate solution:

CAP_AddCurrent(base, CAP_ITEMS, PR_DisassembleItem(base, ufo->comp, ufo->condition, qfalse)); causes PR_DisassembleItem to be called twice in the inline function 'max'
This is where the inventory is added X 2
Calling PR_DisassembleItem seperately & saving size return value before calling CAP_AddCurrent(base, CAP_ITEMS, sizeret ) makes the invventory correct.

However the base stock level still adds 2 X the inventory.
Total stock is updated as PR_DisassembleItem adds each individual item to the seperate stock items so changing to
CAP_AddCurrent(base, CAP_ITEMS, 0  ) gives correct values.
This line should then do nothing (increases stock level by 0) so should be possible to delete.

Regards

  Andy

Pages: [1]