Remove 'value computed is not used' warning from PUT_BREAK macro.
* Put a line break to the output buffer.
*/
-#define PUT_BREAK(emitter) \
- (FLUSH(emitter) \
- && ((emitter->line_break == YAML_CR_BREAK ? \
- (*(emitter->buffer.pointer++) = (yaml_char_t) '\r') : \
- emitter->line_break == YAML_LN_BREAK ? \
- (*(emitter->buffer.pointer++) = (yaml_char_t) '\n') : \
- emitter->line_break == YAML_CRLN_BREAK ? \
- (*(emitter->buffer.pointer++) = (yaml_char_t) '\r', \
- *(emitter->buffer.pointer++) = (yaml_char_t) '\n') : 0), \
- emitter->column = 0, \
- emitter->line ++, \
- 1))
+inline int
+PUT_BREAK(yaml_emitter_t* emitter) {
+ return (FLUSH(emitter)
+ && ((emitter->line_break == YAML_CR_BREAK ?
+ (*(emitter->buffer.pointer++) = (yaml_char_t) '\r') :
+ emitter->line_break == YAML_LN_BREAK ?
+ (*(emitter->buffer.pointer++) = (yaml_char_t) '\n') :
+ emitter->line_break == YAML_CRLN_BREAK ?
+ (*(emitter->buffer.pointer++) = (yaml_char_t) '\r',
+ *(emitter->buffer.pointer++) = (yaml_char_t) '\n') : 0),
+ emitter->column = 0,
+ emitter->line ++,
+ 1));
+}
/*
* Copy a character from a string into buffer.
