diff --git a/Makefile-libpriv.am b/Makefile-libpriv.am index bcccef01..1ccc4aa4 100644 --- a/Makefile-libpriv.am +++ b/Makefile-libpriv.am @@ -48,7 +48,7 @@ librpmostreepriv_la_SOURCES = \ src/libpriv/rpmostree-importer.h \ src/libpriv/rpmostree-unpacker-core.c \ src/libpriv/rpmostree-unpacker-core.h \ - src/libpriv/rpmostree-output.c \ + src/libpriv/rpmostree-output.cxx \ src/libpriv/rpmostree-output.h \ src/libpriv/rpmostree-editor.c \ src/libpriv/rpmostree-editor.h \ diff --git a/src/libpriv/rpmostree-output.c b/src/libpriv/rpmostree-output.cxx similarity index 93% rename from src/libpriv/rpmostree-output.c rename to src/libpriv/rpmostree-output.cxx index 67e488dc..eb4caad1 100644 --- a/src/libpriv/rpmostree-output.c +++ b/src/libpriv/rpmostree-output.cxx @@ -41,7 +41,7 @@ rpmostree_output_default_handler (RpmOstreeOutputType type, break; case RPMOSTREE_OUTPUT_PROGRESS_BEGIN: { - RpmOstreeOutputProgressBegin *begin = data; + auto begin = static_cast(data); if (begin->percent) ror_progress_begin_percent (begin->prefix); else if (begin->n > 0) @@ -52,19 +52,19 @@ rpmostree_output_default_handler (RpmOstreeOutputType type, break; case RPMOSTREE_OUTPUT_PROGRESS_UPDATE: { - RpmOstreeOutputProgressUpdate *upd = data; + auto upd = static_cast(data); ror_progress_update (upd->c); } break; case RPMOSTREE_OUTPUT_PROGRESS_SUB_MESSAGE: { - const char *msg = data; + auto msg = static_cast(data); ror_progress_set_sub_message (msg); } break; case RPMOSTREE_OUTPUT_PROGRESS_END: { - RpmOstreeOutputProgressEnd *end = data; + auto end = static_cast(data); ror_progress_end (end->msg); break; } @@ -129,7 +129,7 @@ rpmostree_output_progress_end_msg (RpmOstreeProgress *taskp, const char *format, void rpmostree_output_progress_percent (int percentage) { - RpmOstreeOutputProgressUpdate progress = { percentage }; + RpmOstreeOutputProgressUpdate progress = { (guint)percentage }; active_cb (RPMOSTREE_OUTPUT_PROGRESS_UPDATE, &progress, active_cb_opaque); }