2

Possible Duplicate:
Format specifies type ‘unsigned short’ but the argument has type ‘int’

I am using the NSString Html category at https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.m

Xcode gives me this suggestion

enter image description here

Should i agree and replace it ?

enter image description here

Community
  • 1
  • 1
shaikh
  • 1,355
  • 4
  • 16
  • 30
  • 1
    It would be better to cast each argument to `(char)` or use the UTF hex encoding for the characters, between single quotes. – Hot Licks Jan 02 '13 at 17:54
  • If you want to print those values as characters, then not, and you should cast to `(unsigned short)` instead. –  Jan 02 '13 at 17:55
  • sorry i was mistaken your question and answered – Dinesh Raja Jan 02 '13 at 17:55
  • The library does not print those character it used them for below purpose. to replace with a space // Replace with a space if ([scanner scanCharactersFromSet:newLineAndWhitespaceCharacters intoString:NULL]) { if (result.length > 0 && ![scanner isAtEnd]) // Dont append space to beginning or end of result [result appendString:@" "]; } – shaikh Jan 02 '13 at 17:57
  • @HotLicks i would appreciate it if you can write your suggested solution in the answer. – shaikh Jan 02 '13 at 18:01
  • FYI - you can replace the 0x000C with `\f` in the format string. – rmaddy Jan 02 '13 at 18:14

1 Answers1

0

It would be better to cast each argument to (char) or use the UTF hex encoding for the characters, between single quotes.

Hot Licks
  • 47,103
  • 17
  • 93
  • 151