Project

General

Profile

Actions

Bug #916

closed

1.4.5: app-layer-detect-proto.c: void function cannot return value

Added by Mark Solaris over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

I get this:

"app-layer-detect-proto.c", line 317: void function cannot return value
cc: acomp failed for app-layer-detect-proto.c

because a void function is returning something:

   314  /** \brief to be called by ReassemblyThreadInit
   315   *  \todo this is a hack, we need a proper place to store the global ctx */
   316  void AlpProtoFinalize2Thread(AlpProtoDetectThreadCtx *tctx) {
   317      return AlpProtoFinalizeThread(&alp_proto_ctx, tctx);
   318  }
   319

though the function is a void anyway:

   276  void AlpProtoFinalizeThread(AlpProtoDetectCtx *ctx, AlpProtoDetectThreadCtx *tctx) {

I suggest this instead:

   314  /** \brief to be called by ReassemblyThreadInit
   315   *  \todo this is a hack, we need a proper place to store the global ctx */
   316  void AlpProtoFinalize2Thread(AlpProtoDetectThreadCtx *tctx) {
   317      AlpProtoFinalizeThread(&alp_proto_ctx, tctx);
   318      return;
   319  }
Actions #1

Updated by Eric Leblond over 10 years ago

  • Status changed from New to Closed
  • Assignee set to Eric Leblond
  • Target version set to 1.4.5
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF