Changeset 4b54bd9 in mainline for uspace/lib/pcut/src/assert.c


Ignore:
Timestamp:
2018-09-12T13:23:03Z (7 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3da0ee4
Parents:
275530a4
Message:

Update PCUT to latest revision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcut/src/assert.c

    r275530a4 r4b54bd9  
    4343
    4444#include "internal.h"
     45
     46#pragma warning(push, 0)
    4547#include <setjmp.h>
    4648#include <stdarg.h>
    4749#include <stdio.h>
     50#pragma warning(pop)
     51
    4852
    4953/** Maximum length of failed-assert message. */
     
    5963static int message_buffer_index = 0;
    6064
    61 void pcut_failed_assertion_fmt(const char *filename, int line, const char *fmt, ...)
    62 {
     65void pcut_failed_assertion_fmt(const char *filename, int line, const char *fmt, ...) {
    6366        va_list args;
    6467        char *current_buffer = message_buffer[message_buffer_index];
     
    6669        message_buffer_index = (message_buffer_index + 1) % MESSAGE_BUFFER_COUNT;
    6770
    68         snprintf(current_buffer, MAX_MESSAGE_LENGTH, "%s:%d: ", filename, line);
     71        pcut_snprintf(current_buffer, MAX_MESSAGE_LENGTH, "%s:%d: ", filename, line);
    6972        offset = pcut_str_size(current_buffer);
    7073
Note: See TracChangeset for help on using the changeset viewer.