X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-export.c;h=fdd4573f979fcdfe6da020167ddab538a624fc96;hb=195a03d84c59ff756bfb893b22f8f4ff2635ceb6;hp=e679b769fd59d4064fbe14d808f1e1b1516a66e6;hpb=efd6d20aee652b5868090e11504a7ba163a09ee3;p=src%2Fapp-framework-binder.git diff --git a/src/afb-export.c b/src/afb-export.c index e679b769..fdd4573f 100644 --- a/src/afb-export.c +++ b/src/afb-export.c @@ -352,6 +352,11 @@ static int require_api_cb(struct afb_api_x3 *closure, const char *name, int init int rc, rc2; char *iter, *end, save; + /* emit a warning about unexpected require in preinit */ + if (export->state == Api_State_Pre_Init) + WARNING("[API %s] requiring apis in pre-init may lead to unexpected result (requires%s: %s)", + export->api.apiname, initialized ? " initialized" : "", name); + /* scan the names in a local copy */ rc = 0; iter = strdupa(name);