Couple of compile errors - General Discussion and Assistance - CHDK Forum

Couple of compile errors

  • 1 Replies
  • 3359 Views
Couple of compile errors
« on: 24 / January / 2012, 20:03:37 »
Advertisements
I noticed that "unused variable" and "format" warnings are disabled ...I enabled them to see if anything was hidden, and there seem to be a couple:

gui_space.c:189:5: warning: unknown conversion type character 'M' in format
gui_space.c:190:5: warning: too few arguments for format
There seems to be some confusion over the use of % in the formatting strings here

This one is just funny:
gui_osd.c:509:14: warning: format '%ld' expects type 'long int', but argument 3 has type 'int'

I am really not sure what the programmer was trying to achieve here, but it almost certainly does not do what (s)he thought it did - this may or may not offer a solution to a problem I have not personally encountered :/
luascript.c:1203:37:  -and-   luascript.c:1204_thru_1208:42:
... warning: left-hand operand of comma expression has no effect

BC

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Couple of compile errors
« Reply #1 on: 25 / January / 2012, 03:02:36 »
I noticed that "unused variable" and "format" warnings are disabled ...I enabled them to see if anything was hidden, and there seem to be a couple:

gui_space.c:189:5: warning: unknown conversion type character 'M' in format
gui_space.c:190:5: warning: too few arguments for format
There seems to be some confusion over the use of % in the formatting strings here

This one is just funny:
gui_osd.c:509:14: warning: format '%ld' expects type 'long int', but argument 3 has type 'int'

I am really not sure what the programmer was trying to achieve here, but it almost certainly does not do what (s)he thought it did - this may or may not offer a solution to a problem I have not personally encountered :/
luascript.c:1203:37:  -and-   luascript.c:1204_thru_1208:42:
... warning: left-hand operand of comma expression has no effect

BC

Welcome to the world of CHDK :)

Lots of developers over the years with varying experience, skill, and style = strange code.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics


SimplePortal © 2008-2014, SimplePortal